define('article-n:widget/v2017/ad-bmc-card/ad-bmc-card.js', function(require, exports, module){ /**
 * @file wise-经验详情页-赞/踩下方服务化广告位
 * @author panhuimin
 * @date 2020.05.28
 */

var $ = require('common:widget/lib/gmu/zepto/zepto.js');
var readWholeEle = $('.read-whole-mask.app');

function init() {
  /*  var $wp = $('.wgt-ad-bmc');
    var container = document.getElementById('wgt-ad-bmc');
    var fragment = document.createElement('fragment');

    $wp.hide();

    readWholeEle.on('click', function (e) {
        $.ajax({
            type: 'get',
            url: '/article/ajax/loadbmcad',
            data: {
                eidEnc: F.context('encEid')
            },
            dataType: 'json',
            success: (res) => {
                if (res.errno === 0) {
                    var bmcAdCard = res.data.data;
                    if (bmcAdCard.css && bmcAdCard.content && bmcAdCard.js) {
                        var newEle = addElement(bmcAdCard);
                        var count = newEle.childElementCount;
                        while (count--) {
                            fragment.appendChild(newEle.children[0]);
                        }
                        container.appendChild(fragment);
                        $wp.show();
                    }
                }
            },
            error: (error) => {
                console.log(error);
            }
        });
    });*/
}

function addElement(ele) {
    var newEle = document.createElement('div');
    newEle.innerHTML = '<style type="text/css">' + ele.css + '</style>'
                        + '<div class="ad-card">' + ele.content + '</div>'
                        + '<script type="text/javascript">' + ele.js + '</script>';
    return newEle;
}

module.exports.init = init;
 
});
;define("article-n:widget/v2017/ad-bottom/ad-bottom.js",function(o,e,t){var i=o("common:widget/lib/gmu/zepto/zepto.js"),n=o("common:widget/ui/nslog/nslog.js");o("common:widget/lib/gmu/slider/slider.js"),o("common:widget/ui/lazyload/lazyload.js");var a={init:function(o,e){var t=this;t.setHeight(o),parseInt(e,10)>1&&o.slider({autoPlayTime:3e3,autoPlay:!0,showDot:!0,showArr:!1}).animate({opacity:1}),o.find(".wrapper-slider").on("click",function(){var o=i(this).index();n(location.href,2021,{module:"article-n",page:"index",pos:"ad-bottom",adIndex:"ad-bottom-slide"+o,action:"click",videoShowCase:F.context("videoShowCase"),strongCorrelation:F.context("strongCorrelation"),wapDetailTest:F.context("wapDetailTest"),newVersion:F.context("newVersion"),recommendVideoData:F.context("recommendVideoData")})}),i(window).on("resize",function(){t.setHeight(o)})},setHeight:function(o){var e=50*o.width()/320;o.height(1.2*e)}};t.exports=a});
;define("article-n:widget/v2017/ad-fix-bottom-banner/ad-fix-bottom-banner.js",function(o,t,e){var a=o("common:widget/lib/gmu/zepto/zepto.js"),n=o("common:widget/ui/nslog/nslog.js"),i=(o("common:widget/ui/lazyload/lazyload.js"),{init:function(o,t){this.adId=o,this.os=t,n(location.href,2021,{module:"article-n",page:"index",pos:"ad-fix-bottom-banner",action:"pv",className:this.adId,recommendVideoData:F.context("recommendVideoData")});var e=a(".wgt-step-read"),i=a(".wgt-unformat-content");this.bannerShowOffsetTop=e.size()?e.offset().top:i.offset().top-a(window).height()/2,this.showBottomBanner()},addjust:function(){},showBottomBanner:function(){var o=a("#exp-fixed-bottom"),t=this;o.on("click",function(e){var i=e.target;return a(i).hasClass("close")?(o.hide(),n(location.href,2021,{module:"article-n",page:"index",pos:"ad-fix-bottom-banner",action:"close",className:t.adId,recommendVideoData:F.context("recommendVideoData")}),!1):void n(location.href,2021,{module:"article-n",page:"index",pos:"ad-fix-bottom-banner",action:"click",className:t.adId,recommendVideoData:F.context("recommendVideoData")})}),a(window).on("scroll.bottom",function(){var e=document.body.scrollTop;if(e>t.bannerShowOffsetTop){t.addjust(),o.children("div").addClass("exp-fixed-bottom-banner");var i=o.find("img");i.attr("src",i.data("src"));var d=o.find("a");d.attr("href",d.data("link")),o.show().animate({opacity:1}),n(location.href,2021,{module:"article-n",page:"index",pos:"ad-fix-bottom-banner",action:"show",className:t.adId,recommendVideoData:F.context("recommendVideoData")}),a(window).off("scroll.bottom")}})}});e.exports=i});
;define("article-n:widget/v2017/ad-fix-bottom-banner/shoubaiApp/shoubaiApp.js",function(n,o,i){var e=(n("common:widget/lib/gmu/zepto/zepto.js"),n("common:widget/ui/nslog/nslog.js"),{init:function(){window.openBox=window.OpenBox({showTip:!0,from:"neibu_jingyan",channel:"1019447g"})}});i.exports=e});
;define("article-n:widget/v2017/advanced-head/advanced-head.es",function(e,t,a){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,a,n){return a&&e(t.prototype,a),n&&e(t,n),t}}(),l=e("common:widget/lib/gmu/zepto/zepto.js"),r=n(l),c=e("common:widget/js/share/share.es"),d=n(c),s=e("common:widget/ui/nslog/nslog.js"),u=n(s),f=e("common:widget/js/util/event/event.es"),v=function(){function e(){i(this,e),this.eventHandler()}return o(e,[{key:"eventHandler",value:function(){r["default"](".advanced-share").on("click",function(){var e="百度经验-实用生活指南",t={title:r["default"](".exp-title").text(),summary:"解决你所有的生活难题",weiboTitle:e,pic:"https://jingyan.baidu.com/event/img/jingyan-fx.jpg",log:{page:"article-n-v2017-advanced"}};d["default"].share(t),u["default"](location.href,2021,{module:"article-n",page:"advanced",pos:"advanced-share",action:"click",wapDetailTest:F.context("wapDetailTest")})});var e=r["default"]("#org-abstract-wp"),t=r["default"]("#org-abstract"),a=r["default"]("#org-arrow-wp");t.height()>84&&(t.addClass("small"),a.show()),a.on("click",function(n){n.preventDefault(),e.addClass("big"),t.removeClass("small"),a.hide(),t.css("width","100%"),f.event.emit("calculateTop")})}}]),e}();t["default"]=v,a.exports=t["default"]});
;define("article-n:widget/v2017/outer-into-swan/outer-into-swan.es",function(e,n,o){"use strict";function t(e){return e&&e.__esModule?e:{"default":e}}function i(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function a(e){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=function(e){e=String(e);for(var o=void 0,t=void 0,i=void 0,a=void 0,r=0,c="",s=e.length%3;r<e.length;){if((t=e.charCodeAt(r++))>255||(i=e.charCodeAt(r++))>255||(a=e.charCodeAt(r++))>255)throw new TypeError('Failed to execute "btoa" on "Window": The string to be encoded contains characters outside of the Latin1 range.');o=t<<16|i<<8|a,c+=n.charAt(o>>18&63)+n.charAt(o>>12&63)+n.charAt(o>>6&63)+n.charAt(63&o)}return s?c.slice(0,s-3)+"===".substring(s):c};try{window.btoa(" "),o=window.btoa}catch(t){}return o(e)}function r(e){function n(e){var n=document.createElement("iframe");n.src=e,n.style.display="none",document.body.appendChild(n),window.setTimeout(function(){document.body.removeChild(n)},300)}for(var o=[{reg:/\(.*Android.*(MI|Mi|Redmi).*\)/,scheme:"mimarket://details?id=com.baidu.searchbox&back=true"},{reg:/\(.*Android.*(SAMSUNG|SM-).*\)/,scheme:"samsungapps://ProductDetail/com.baidu.searchbox"},{reg:/\(.*Android.*(HUAWEI|HONOR).*\)/i,scheme:"appmarket://details?id=com.baidu.searchbox"},{reg:/\(.*Android.*OPPO.*\)/,scheme:"oppomarket://details?packagename=com.baidu.searchbox"},{reg:/\(.*Android.*\)/,scheme:"market://details?id=com.baidu.searchbox"}],t=0;t<o.length;t++)if(o[t].reg.test(navigator.userAgent)){n(o[t].scheme);break}setTimeout(function(){e&&(window.location.href=e)},300)}Object.defineProperty(n,"__esModule",{value:!0});var c=function(){function e(e,n){for(var o=0;o<n.length;o++){var t=n[o];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}return function(n,o,t){return o&&e(n.prototype,o),t&&e(n,t),n}}(),s=e("common:widget/lib/gmu/zepto/zepto.js"),u=t(s),d=e("common:widget/ui/nslog/nslog.js"),l=t(d),f=e("article-n:widget/v2017/js/util/copy-to-clipboard.js"),p=t(f),h=function(){function e(){var n=arguments.length<=0||void 0===arguments[0]?{swanUrl:""}:arguments[0];if(i(this,e),!n.swanUrl)throw new Error("swanUrl is necessary");this.popupLead=u["default"]("#popupLead"),this.cancelBtn=u["default"](".popup-lead-cancel"),this.confirmBtn=u["default"](".popup-lead-confirm"),this.confirm=n.confirm,this.cancel=n.cancel,this.swanUrl=n.swanUrl,this.init()}return c(e,[{key:"init",value:function(){this.eventHandler()}},{key:"eventHandler",value:function(){var e=this;this.cancelBtn.on("click",function(){l["default"](location.href,2021,{pos:"outer-into-swan-cancel-btn",action:"click"}),"function"==typeof e.cancel&&e.cancel()}),this.confirmBtn.on("click",function(){l["default"](location.href,2021,{pos:"outer-into-swan-confirm-btn",action:"click"}),e.invoke(),"function"==typeof e.confirm&&e.confirm()})}},{key:"invoke",value:function(){var e="https://itunes.apple.com/cn/app/id382201985",n="GeVyFwtN81ARbPF3GIbuaPlRPT3SfzYB",o=this.swanUrl,t={activity_id:227,url:""+n+o},i="1023751h",c="1023751i",s="https://boxer.baidu.com/scheme?source="+i+"&channel="+c+"&p1="+c+"&p2=&p3="+i+"&tokenData="+encodeURIComponent(encodeURIComponent(JSON.stringify(t))),u="swan/"+n+"/"+o,d={p1:c,p2:"",p3:i,scheme:u},f="^quCYkpfnQq^"+a(JSON.stringify(d));p["default"].copyToClipBoard(f);var h="baiduboxapp://swan/GeVyFwtN81ARbPF3GIbuaPlRPT3SfzYB"+o+"&_baiduboxapp="+encodeURIComponent(JSON.stringify({from:i})),m=/uc browser|ucbrowser|ucweb/i;m.test(navigator.userAgent)&&(e=s);var w={iosScheme:h,androidCommand:h,from:i,channel:c,failUrl:e,waitTime:600,failCallback:function(){r(s)}};if(l["default"](location.href,2021,{pos:"outer-into-swan",action:"invoke-openbox"}),window.OpenBox){var b=window.OpenBox(w);b.open()}else l["default"](location.href,2021,{pos:"outer-into-swan",action:"error",msg:"window.OpenBox not exist"})}},{key:"show",value:function(){l["default"](location.href,2021,{pos:"outer-into-swan",action:"show"}),this.popupLead.show()}},{key:"hide",value:function(){l["default"](location.href,2021,{pos:"outer-into-swan",action:"hide"}),this.popupLead.hide()}}]),e}();n["default"]=h,o.exports=n["default"]});
;define('article-n:widget/v2017/dom-ready/dom-ready.js', function(require, exports, module){ /**
 * @file dom-ready
 * @author yanhaijing.com
 * @date 2016年3月28日11:06:58
 */

var $ = require('common:widget/lib/gmu/zepto/zepto.js');
var cookie = require('common:widget/js/util/cookie/cookie.js');
var nslog = require('common:widget/ui/nslog/nslog.js');
var ec = require('common:widget/js/util/event/event.es').event;
var PageHeader = require('article-n:widget/v2017/page-header/page-header.es').PageHeader;
var expSend = require('article-n:widget/v2017/js/logic/nslog-exp/nslog-exp.es').expSend;
var inTt = require('article-n:widget/v2017/js/util/inTt.min.js');
var invokeBaidubox = require('common:widget/lib/invokebaidubox/invokebaidubox.js').invoke;
var OuterIntoSwan = require('article-n:widget/v2017/outer-into-swan/outer-into-swan.es');
var getUaInfo = require('article-n:widget/v2017/js/util/util.es').getUaInfo;

var unfolded = false;
var pageHeaderHeight = 44; // pageHeader高度
var isToutiao = Boolean(inTt()); // 是否在头条环境下
var isFrTT = /expfr=tt/.test(window.location.href); // 是否由头条跳转而来
var uaInfo = getUaInfo(); // 获取端信息
var openType = uaInfo.isBaiduBox ? 'baiduboxapp' : 'wise'; // 区分端
// 来源 search(大搜) others（其他）
var source = /https?:\/\/(?:m|m5|www)\.baidu\.com/.test(document.referrer) ? 'search' : 'others';
var clipboard = require('article-n:widget/v2017/js/util/copy-to-clipboard.js');

// 阅读全文蒙层
function readWholeMask() {
    var winHeight = $(window).height() || 0;
    var expOuterContainer = $('.exp-content-container');
    var expContentContainer = $('.exp-whole-content');
    var readWholeMask = $('.read-whole-mask.app');
    var hasMask = false;
    var readInBaidu = '';
    // 调起手百，参考文档http://agroup.baidu.com/box/md/article/390786
    // window.OpenBox 是引用 openbox.js 之后生成的全局变量，用于调起手百
    var frFlag = '?expfr=tt';
    if (F.context('destGroup') === 'baiduAppExp') {
        frFlag = '?dest=baiduApp';
    }
    var openUrl = window.location.href.split('?')[0] +  frFlag; // 增加从头条而来的标识
    if (isToutiao) {
        var openbox = window.OpenBox({
            url: openUrl,
            iosScheme: 'baiduboxapp://browse?url=' + encodeURIComponent(openUrl) + '&opennewwindow=1&minver=3.8.0.0',
            androidCommand: {mode: '2', url: openUrl, min_v: '25165824'}
        });
    }
    if (isToutiao) {
        readWholeMask = $('.read-whole-mask.toutiao');
    } else if (F.context('destGroup') === 'baiduAppExp') {
        readWholeMask = $('.read-whole-mask.outer .exp-mask');
        readInBaidu = $('.read-whole-mask.outer .read-whole');
    }
    F.context('moduleParams').isFrTT = isFrTT;
    function handleMask() {
        if (expContentContainer.height() > expOuterContainer.height() && !hasMask) {
            readWholeMask.show();
            if (F.context('destGroup') === 'baiduAppExp') {
                readWholeMask.parent('.read-whole-mask').show();
            }
            hasMask = true;
        }
    }
    if (winHeight > 0) {
        handleMask();
        $(window).on('scroll', handleMask);
        readWholeMask.on('click', function (e) {
            nslog(location.href, 2021, {
                module: 'article-n',
                page: 'index',
                pos: 'read-whole-mask',
                action: 'click',
                isToutiao: isToutiao,
                isFrTT: isFrTT,
                destGroup: F.context('destGroup')
            });
            if (isToutiao) {
                openbox.open(); // 调起手百
                return;
            }
            if (parseInt(F.context('bdappJump'), 10) === 1 && !/baiduboxapp/gi.test(navigator.userAgent)) {
                try {
                    const ois = new OuterIntoSwan({
                        swanUrl: F.context('bdappUri'),
                        confirm() {
                            ois.hide();
                        },
                        cancel() {
                            ois.hide();
                            expOuterContainer.removeClass('fold');
                            readWholeMask.hide();
                            if (F.context('destGroup') === 'baiduAppExp') {
                                readWholeMask.parent('.read-whole-mask').hide();
                            }
                            unfolded = true;
                        }
                    });
                    ois.show();
                    return;
                } catch (e) {
                    nslog(location.href, 2021, {
                        module: 'article-n',
                        page: 'index',
                        pos: 'error',
                        time: Date.now(),
                        msg: encodeURIComponent(e.stack || e.message)
                    });
                }
            }

            expOuterContainer.removeClass('fold');
            readWholeMask.hide();
            if (F.context('destGroup') === 'baiduAppExp') {
                readWholeMask.parent('.read-whole-mask').hide();
            }
            unfolded = true;
        });
        readInBaidu && readInBaidu.on('click', function (e) {
            expSend({
                pos: 'outer-to-baidu',
                action: 'click'
            });
            if (F.context('destGroup') === 'baiduAppExp') {
                invokeBaidubox({
                    app: 3,
                    mode: 3,
                    invoke_url: openUrl,
                    from: '1023141l',
                    channel: '1023141q'
                });
            }
        });
    }
}

function init(newQBFlag, isSecondaryClass, os, videoType) {
    window.addEventListener('pageshow', function (e) {
        if (e.persisted) {
            window.location.reload();
        }
    });
    // 阅读全文蒙层
    readWholeMask();

    // 视频自动播放
    $(document).ready(function () {
        if (+F.context('hasVideo') === 1 && ((+videoType === 1) || (+videoType === 2))) {
            // 下掉自动播放-20180129-zcm
            // $('.wgt-exp-video').find('.video-img').trigger('click', {autoPlay: true});
            // 自动播和未自动播放的视频经验PV
            setTimeout(function () {
                nslog(location.href, 2021, {
                    module: 'article-n',
                    page: 'index',
                    pos: 'index-show',
                    action: 'show',
                    autoPlay: 0,
                    recommendVideoData: F.context('recommendVideoData')
                });
            }, 1000);
        }
    });

    // 统计页面停留时长
    var lastTime = new Date().getTime();
    var lastingTime = 0;
    var fistLoadTime = new Date().getTime();
    var hasAction = false;

    // 设置小流量cookie
    cookie.set('NEWQBFLAG', newQBFlag, {path: '/'});
    cookie.set('EXPGROUP', F.context('expGroup'), {path: '/'});

    // 在手百浏览器里种手百分享配置
    if (+F.context('isShoubai')) {
        window.BoxShareData = {
            'options': {
                type: 'url',
                mediaType: 'all',
                title: $('title').text(),
                content: location.href,
                linkUrl: location.href.indexOf('?') === -1  ? location.href
                + '?isBdboxShare=1' : location.href + '&isBdboxShare=1'
            },
            successcallback: 'console.log',
            errorcallback: 'console.log'
        };
    }
    if (/baiduboxapp/.test(navigator.userAgent.toLowerCase()) && typeof (Box) === 'undefined') {
        var script = document.createElement('script');
        script.src = '//s.bdstatic.com/common/openjs/aio.js?v=20170510';
        $(document.body).append(script);
    }
    // 初始化PageHeader
    var pageHeader = new PageHeader();

    // $ 扩充 fadeIn fadeOut fadeToggle
    fadeEnable();

    var countAdItem = 0;
    // 统计有多少广告显示出来
    $('.ad-card').find('.ec_jingyan_ad').each(function (index, item) {
        if ($(item).css('display') === 'block' && $(item).css('visibility') !== 'hidden') {
            countAdItem++;
        }
    });
    nslog(location.href, 2021, {
        module: 'article-n',
        page: 'index',
        pos: 'bottom',
        action: 'show',
        adCount: countAdItem,
        recommendVideoData: F.context('recommendVideoData')
    });

    var me = this;

    // 统计真实pv，by yanhaijing.com 2016年12月5日18:51:19
    // 触摸两次pv
    var touchcount = 0;
    $('body').on('touchend', function (e) {
        if (touchcount > 2) {
            return;
        }

        if (touchcount < 2) {
            touchcount += 1;
            return;
        }

        touchcount += 1;
        nslog(location.href, 2021, {
            module: 'article-n',
            page: 'index',
            pos: 'all',
            action: 'touch2pv',
            recommendVideoData: F.context('recommendVideoData')
        });

        nslog(location.href, 2021, {
            module: 'article-n',
            page: 'index',
            pos: 'all',
            action: 'touchHX',
            eid: F.context('eidEnc'),
            touch: '3',
            recommendVideoData: F.context('recommendVideoData')
        });
    });

    var throttleReadWhole = throttle(onScrollReadWhole, 100);
    var throttleReadedWhole = throttle(onScrollReadedWhole, 100);
    var throttleTTReadWhole = throttle(onScrollTTReadWhole, 100);
    var throttleOuterReadWhole = throttle(onScrollOuterReadWhole, 100);
    var throttleOuterToBaidu = throttle(onScrollOuterToBaidu, 100);
    var throttleLike = throttle(onScrollLike, 100);
    var throttleRelExp = throttle(onScrollRelExp, 100);
    var throttleRelExpZhidao = throttle(onScrollRelExpZhidao, 100);
    var throttleRelExpVideo = throttle(onScrollRelExpVideo, 100);
    var throttleRelExpText = throttle(onScrollRelExpText, 100);
    var throttleMoreRelExp = throttle(onScrollMoreRelExp, 100);
    var throttleAdRecommend = throttle(onScrollAdRecommend, 100);
    var throttleAdBottom = throttle(onScrollAdBottom, 100);
    var throttleBottom = throttle(onScrollBottom, 100);
    var throttleFixBar = throttle(onScrollFixBar, 100);
    var throttleWarning = throttle(onScrollWarning, 100);
    var throttleAdZhihuijinnang = throttle(onScrollAdZhihuijinnang, 100);
    var throttleAdOrgiBanner = throttle(onScrollAdOrgiBanner, 100);
    var throttlePanAttachment = throttle(onScrollPanAttachment, 100);

    // 20200410-内容电商-每个商品的展现量（目前每篇经验只能添加一个商品）
    var goodsItems = $('.js-exp-goods-info-area');
    var throttleGoodsInfoBox = {};
    for (var i = 0, len = goodsItems.length; i < len; i++) {
        throttleGoodsInfoBox[i] = throttle(onScrollGoodsInfoBox.bind(this, i), 100);
    }

    function onScrollGoodsInfoBox(i) {
        var stepIndex = goodsItems.eq(i).data('step-index');
        return onScrollHandler('.js-exp-goods-box-' + stepIndex, 'step-goods-info', throttleGoodsInfoBox[i]);
    }

    // 每条相关经验的展现
    var relExpList = $('.wgt-rel-exp li');
    var throttleRelExpList = {};
    for (var i = 0; i < relExpList.length; i++) {
        throttleRelExpList[i] = throttle(onScrollRelExpList.bind(this, i), 100);
    }
    // 每条相关经验
    function onScrollRelExpList(i) {
        return onScrollHandler('.wgt-rel-exp .' + $(relExpList[i]).attr('data-type') + '-' + (i + 1),
            'relate-exp-' + $(relExpList[i]).attr('index'), throttleRelExpList[i],
            {recId: $(relExpList[i]).data('recId'), index: $(relExpList[i]).attr('index')});
    }
    // 阅读全文
    function onScrollReadWhole() {
        return onScrollHandler('.read-whole-mask', 'read-whole-mask', throttleReadWhole);
    }
    function onScrollTTReadWhole() {
        return onScrollHandler('.read-whole-mask.toutiao', 'read-whole-mask', throttleTTReadWhole);
    }
    function onScrollOuterReadWhole() {
        return onScrollHandler('.read-whole-mask.outer', 'read-whole-mask', throttleOuterReadWhole);
    }
    // 端外调起
    function onScrollOuterToBaidu() {
        return onScrollHandler('.read-whole-mask.outer .read-whole', 'outer-to-baidu', throttleOuterToBaidu);
    }
    // 展开后阅读完全文
    function onScrollReadedWhole() {
        function readedWhole() {
            if (unfolded) {
                onScrollHandler('.wgt-exp-copyright', 'readed-whole', throttleReadedWhole);
            }
        }
        return readedWhole();
    }
    // 点赞
    function onScrollLike() {
        return onScrollHandler('.wgt-like-and-share', 'like', throttleLike);
    }
    // 相关经验
    function onScrollRelExp() {
        return onScrollHandler('.wgt-rel-exp', 'relate-exp', throttleRelExp);
    }
    // 相关经验知道入口
    function onScrollRelExpZhidao() {
        return onScrollHandler('.from-zhidao', 'relate-exp-zhidao', throttleRelExpZhidao);
    }
    // 相关视频经验
    function onScrollRelExpVideo() {
        return onScrollHandler('.wgt-rel-exp .video', 'relate-exp-video', throttleRelExpVideo);
    }
    // 相关文字经验
    function onScrollRelExpText() {
        return onScrollHandler('.wgt-rel-exp .content', 'relate-exp-text', throttleRelExpText);
    }
    // 更多相关经验
    function onScrollMoreRelExp() {
        return onScrollHandler('.wgt-rel-exp .more-rel-exp', 'more-relate-exp', throttleMoreRelExp);
    }
    // 相关推荐(广告)
    function onScrollAdRecommend() {
        return onScrollHandler('.wgt-ad-recommend', 'ad-recommend', throttleAdRecommend);
    }
    // 底部推广位
    function onScrollAdBottom() {
        return onScrollHandler('#' + F.context('AD_BOTTOM_MIX'), 'ad-bottom', throttleAdBottom);
    }
    // 机构banner(广告)
    function onScrollAdOrgiBanner() {
        return onScrollHandler('#js-ad-orgi-banner', 'ad-orgi-banner', throttleAdOrgiBanner);
    }

    function onScrollPanAttachment() {
        return onScrollHandler('#pan-attachment-id', 'pan-attachment', throttlePanAttachment);
    }

    // 滑动到底部
    function onScrollBottom() {
        var sy = window.scrollY;
        var h = window.innerHeight;
        var top = $(document).height();

        if (sy + h === top) {
            $(window).off('scroll', throttleBottom);

            nslog(location.href, 2021, {
                module: 'article-n',
                page: 'index',
                pos: 'scroll-to-bottom',
                action: 'show',
                wapDetailTest: F.context('wapDetailTest'),
                strongCorrelation: F.context('strongCorrelation'),
                newVersion: F.context('newVersion'),
                recommendVideoData: F.context('recommendVideoData')
            });
        }
    }
    function onScrollAdZhihuijinnang() {
        return onScrollHandler('#wgt-ad-zhihuijinnang', 'ad-zhihuijinnang', throttleAdZhihuijinnang);
    }
    // 警告只在步骤上方显示，防止与吸顶冲突
    function onScrollWarning() {
        if (!$('.block-item').length || !$('.warning').length) {
            return;
        }
        var sy = window.scrollY;
        var top = $('.block-item').first().offset().top; // 吸顶

        if (sy > (top - pageHeaderHeight)) {
            $('.warning').hide();
        } else if ((!F.context('warningClosed')) && ($('.warning').css('display') === 'none')) {
            $('.warning').show();
        }
    }
    // 吸顶出现次数
    function onScrollFixBar() {
        if (!$('.block-item').length) {
            return;
        }
        var sy = window.scrollY;
        var top = $('.block-item').first().offset().top; // 吸顶

        if (sy > (top - pageHeaderHeight)) {
            $(window).off('scroll', throttleFixBar);

            nslog(location.href, 2021, {
                module: 'article-n',
                page: 'index',
                pos: 'fix-bar',
                action: 'show',
                strongCorrelation: F.context('strongCorrelation'),
                wapDetailTest: F.context('wapDetailTest'),
                newVersion: F.context('newVersion'),
                recommendVideoData: F.context('recommendVideoData')
            });
        }
    }
    // 吸顶
    if ($('.block-item-header').length) {
        var winHeight = window.innerHeight;
        var baseTopToFix = $($('.block-item-header')[0]).offset().top - pageHeaderHeight;
        ec.on('calculateTop', function () {
            if (!$($('.block-item-header')[0]).hasClass('block-item-header-fix')) {
                baseTopToFix = $($('.block-item-header')[0]).offset().top - pageHeaderHeight;
            }
        });
        function onscrollHeaderFix() {
            var firstItemHeader = $('.block-item-header')[0];
            var topToFix = Math.max($(firstItemHeader).offset().top - pageHeaderHeight, baseTopToFix);
            var lastContentEle = $('.wgt-exp-content').last();
            var lastContentTop = $(lastContentEle).offset().top;
            var lastContentHeight = $(lastContentEle).height();
            var lastContentBottom = $(lastContentEle).offset().bottom;
            var topToRemoveFix = lastContentTop + lastContentHeight - pageHeaderHeight;

            // 滚动距离
            var sy = window.scrollY;
            if (sy >= topToFix && sy < (lastContentBottom - pageHeaderHeight) && sy < $('.exp-content-container').height()) {
                $(firstItemHeader).addClass('block-item-header-fix');
            }
            else {
                $(firstItemHeader).find('.green').html(1);
                $(firstItemHeader).removeClass('block-item-header-fix');
            }

            // 更新内容
            $('.block-item-header').forEach(function (item, index) {
                var itemOffsetTop = $(item).offset().top;
                if (sy > (itemOffsetTop - 80)) {
                    var stepNum = $(item).attr('step-num');
                    var stepIndex = $(item).attr('step-index');
                    var href = $(item).parent().attr('href');
                    $('.block-item-header-fix').parent().attr('href', href);
                    var appendHtml = '<span class="green">' + stepIndex + '</span>/' + stepNum;
                    $('.block-item-header-fix').find('.counter').html(appendHtml);
                }
            });
        }
    }

    $(window).on('scroll', throttleReadWhole); // 阅读全文show
    $(window).on('scroll', throttleReadedWhole); // 展开后阅读完全文
    $(window).on('scroll', throttleTTReadWhole);
    $(window).on('scroll', throttleOuterReadWhole);
    $(window).on('scroll', throttleOuterToBaidu);
    $(window).on('scroll', throttleLike); // 点赞show
    $(window).on('scroll', throttleRelExp); // 相关经验show
    $(window).on('scroll', throttleRelExpZhidao); // 相关经验知道推荐show
    $(window).on('scroll', throttleRelExpVideo); // 相关视频经验show
    $(window).on('scroll', throttleRelExpText); // 相关文字经验show
    $(window).on('scroll', throttleMoreRelExp); // 更多相关经验show
    $(window).on('scroll', throttleAdRecommend); // 相关推荐(广告)show
    $(window).on('scroll', throttleAdBottom); // 底部推广位show
    $(window).on('scroll', throttleAdZhihuijinnang); // 智慧锦囊广告位show
    $(window).on('scroll', throttleBottom); // 滑动到底部
    $(window).on('scroll', throttleFixBar); // 吸顶出现次数
    // $(window).on('scroll', throttleWarning); // 警告只在步骤上方显示，防止与吸顶冲突
    // $(window).on('scroll', throttleScorer); // 上上策评星部分
    $(window).on('scroll', throttleAdOrgiBanner); // 机构banner(广告)show
    $(window).on('scroll', throttlePanAttachment); // 百度网盘外链附件show

    // 每条相关经验show
    for (var i = 0; i < relExpList.length; i++) {
        $(window).on('scroll', throttleRelExpList[i]);
    }

    // 20200410-内容电商-商品信息show
    for (var i = 0; i < goodsItems.length; i++) {
        $(window).on('scroll', throttleGoodsInfoBox[i]);
    }

    if ($('.block-item-header').length && !F.context('ShowFeedExp')) {
        $(window).on('scroll', throttle(onscrollHeaderFix, 100)); // 吸顶
    }
    // 相关推荐(广告)点击量
    $('.wgt-ad-recommend').on('click', 'a', function () {
        nslog(location.href, 2021, {
            module: 'article-n',
            page: 'index',
            pos: 'ad-recommend',
            action: 'click',
            videoShowCase: F.context('videoShowCase'),
            strongCorrelation: F.context('strongCorrelation'),
            wapDetailTest: F.context('wapDetailTest'),
            newVersion: F.context('newVersion'),
            recommendVideoData: F.context('recommendVideoData')
        });
    });
    // 详情页PV
    nslog(location.href, 2021, {
        module: 'article-n',
        page: 'index',
        pos: 'page',
        action: 'show',
        source: source,
        wapDetailTest: F.context('wapDetailTest'),
        newVersion: F.context('newVersion'),
        recommendVideoData: F.context('recommendVideoData'),
        intention: 'video-feeds-log',
        gifCover: F.context('gifCover') || 0,
        feedVideoGroup: F.context('feedVideoGroup'),
        seedVid: F.context('feedsVid'),
        showVideoFeeds: F.context('showVideoFeeds'),
        showVideoFeedsFromRel: F.context('showVideoFeedsFromRel'),
        showRelAd: F.context('showRelAd'),
        hasVideo: !!parseInt(F.context('hasVideo') || F.context('showVideoFeeds')),
        hasVideoFeed: !!parseInt(F.context('showVideoFeeds')),
        openType: openType,
        videoProducer: 'jingyan'
    });

    $(document).on('click scroll', function(){
        var time = new Date().getTime();
        lastingTime += time - lastTime;
        lastTime = time;
        hasAction = true;
    });

    $(window).on('unload', function (e) {
        var time = new Date().getTime();
        lastingTime += time - lastTime;
        var stayPageTime = time - fistLoadTime;

        nslog(location.href, 2021, {
            module: 'article-n',
            page: 'index',
            pos: 'all',
            action: 'lastingtime',
            lastingTime: Math.round(lastingTime / 1000),
            hasAction: hasAction,
            wapDetailTest: F.context('wapDetailTest'),
            newVersion: F.context('newVersion'),
            recommendVideoData: F.context('recommendVideoData'),
            searchBackFlow: F.context('searchBackFlow')
        });

        if (F.context('eidEnc') === 'c45ad29c002d03051753e223') {
            nslog(location.href, 2021, {
                module: 'article-n',
                page: 'index',
                pos: 'c45ad29c002d03051753e223',
                action: 'stayPageTime',
                stayPageTime: Math.round(stayPageTime / 1000)
            });
        }
    });

    // 搜索框的点击量
    $('.search-icon').on('click', function () {
        nslog(location.href, 2021, {
            module: 'article-n',
            page: 'index',
            pos: 'page-header_search',
            action: 'click',
            wapDetailTest: F.context('wapDetailTest'),
            newVersion: F.context('newVersion'),
            recommendVideoData: F.context('recommendVideoData')
        });
    });

    // 个人中心功能键点击量
    $('#menu-tip').on('click', 'a', function () {
        var area = $(this).find('i').attr('class');
        nslog(location.href, 2021, {
            module: 'article-n',
            page: 'index',
            pos: 'page-header_' + area,
            action: 'click',
            wapDetailTest: F.context('wapDetailTest'),
            newVersion: F.context('newVersion'),
            recommendVideoData: F.context('recommendVideoData')
        });
    });
    // 广告渲染量
    var adGuessEl = $('.wgt-ad-guess a');
    if (adGuessEl.length) {
        for (var adi = 0; adi < adGuessEl.length; adi++) {
            if (adGuessEl.eq(adi).css('visibility') !== 'hidden' && adGuessEl.eq(adi).css('display') !== 'none') {
                nslog(location.href, 2021, {
                    module: 'article-n',
                    page: 'index',
                    pos: 'ad-guess',
                    action: 'render'
                });
                break;
            }
        }
    }
    var adRecEl = $('.wgt-ad-recommend a');
    if (adRecEl.length) {
        for (var adj = 0; adj < adRecEl.length; adj++) {
            if (adRecEl.eq(adj).css('visibility') !== 'hidden' && adRecEl.eq(adj).css('display') !== 'none') {
                nslog(location.href, 2021, {
                    module: 'article-n',
                    page: 'index',
                    pos: 'ad-recommend',
                    action: 'render'
                });
                break;
            }
        }
    }
    // 一跳广告点击量
    $('.wgt-ad-guess').on('click', 'a', function () {
        nslog(location.href, 2021, {
            module: 'article-n',
            page: 'index',
            pos: 'ad-guess',
            action: 'click'
        });
    });

    adjustCss();

    // 机构 banner（广告）点击量
    $('#js-ad-orgi-banner').on('click', 'a', function () {
        nslog(location.href, 2021, {
            module: 'article-n',
            page: 'index',
            pos: 'ad-orgi-banner',
            action: 'click'
        });
    });
    // 智慧锦囊广告位点击量
    $('#wgt-ad-zhihuijinnang').on('click', 'a', function () {
        nslog(location.href, 2021, {
            module: 'article-n',
            page: 'index',
            pos: 'ad-zhihuijinnang',
            action: 'click'
        });
    });

    // 20200410-内容电商-商品点击量
    $('.js-exp-goods-info-area').on('click', 'a', function (e) {
        const href = $(e.currentTarget).attr('href');
        if (href) {
            expSend({
                pos: 'step-goods-info',
                action: 'click'
            });
            window.open(href);
        }
    });

    // 20200427-网盘外链-点击量
    $('#pan-attachment-id').on('click', function (e) {
        const me = $(e.currentTarget);
        const href = me.data('link');
        const pwd = me.data('pwd');

        if (href) {
            if (pwd) {
                clipboard.copyToClipBoard(pwd);
            }
            expSend({
                pos: 'pan-attachment',
                action: 'click'
            });
            window.open(href);
        }
    });
}

function adjustCss () {
    let hasLastGoods = $('.block-ol-last .js-exp-goods-info-area').length;
    const hasNotice = $('.wgt-notice').length;
    const hasPanAttachment = $('#pan-attachment-id').length;
    if ($('.tags-wp').length === 0) {
        if (hasLastGoods && !hasNotice || hasPanAttachment) { // 最后一步有商品且无注意事项|有网盘不加borderTop
        } else {
            $('.wgt-exp-copyright').css({
                borderTop: '1px solid #eee'
                // marginTop: '-10px'
            });
        }
    } else {
        $('#js-ad-orgi-banner').addClass('has-tags');
    }
}

function fadeEnable() {
    $.extend($.fn, {
        fadeOut: function (speed, complete) {
            var speed = speed || 400;
            $(this).css({
                opacity: 1
            }).animate({
                opacity: 0
            }, speed, 'swing', function () {
                $(this).css('display', 'none');
                complete && typeof(complete) === 'function' && complete();
            });
            return this;
        },
        fadeIn: function (speed, complete) {
            var speed = speed || 400;

            $(this).css({
                display: 'block',
                opacity: 0
            }).animate({
                opacity: 1
            }, speed, 'swing', function () {
                complete && typeof(complete) === 'function' && complete();
            });

            return this;
        },
        fadeToggle: function (speed, complete) {
            return this.each(function () {
                var el = $(this);
                el[(el.css('opacity') === 0 || el.css('display') === 'none') ? 'fadeIn' : 'fadeOut'](speed, complete)
            })
        }
    })
}

// 相关位置展现量打点处理
function onScrollHandler(selector, pos, offFun, otherData) {
    // 在视频 feeds 下，全部原始页面show 不打点；
    if ($('#videoFeedsWrapper').css('display') === 'block') {
        return;
    }
    if (!$(selector).length || ($(selector).length && $(selector).css('display') === 'none')) {
        return;
    }
    var sy = window.scrollY;
    var h = window.innerHeight;
    var eleOffset = $(selector).offset();
    var top = eleOffset.top;
    if (eleOffset.height > 0 && sy + h > top) {
        $(window).off('scroll', offFun);
        if (pos === 'relate-exp-mix-1') {
            nslog(location.href, 2021, $.extend({
                module: 'article-n',
                page: 'index',
                pos: pos,
                action: 'show',
                wapDetailTest: F.context('wapDetailTest'),
                encEid: F.context('encEid'),
                strongCorrelation: F.context('strongCorrelation'),
                newVersion: F.context('newVersion'),
                recommendVideoData: F.context('recommendVideoData'),
                relateExpGroup: F.context('relateExpGroup'),
                showVideoFeedsFromRel: F.context('showVideoFeedsFromRel') || 0,
                intention: 'video-feeds-log',
                feedVideoGroup: F.context('feedVideoGroup'),
                showVideoFeeds: F.context('showVideoFeeds'),
                seedVid: $('.mix-1').attr('seed-vid') || 'none',
                isPd: $('.mix-1').data('pd')
            }, otherData));
        }
        else if (pos === 'relate-exp-mix-2') {
            nslog(location.href, 2021, $.extend({
                module: 'article-n',
                page: 'index',
                pos: pos,
                action: 'show',
                wapDetailTest: F.context('wapDetailTest'),
                encEid: F.context('encEid'),
                strongCorrelation: F.context('strongCorrelation'),
                newVersion: F.context('newVersion'),
                recommendVideoData: F.context('recommendVideoData'),
                relateExpGroup: F.context('relateExpGroup'),
                showVideoFeedsFromRel: F.context('showVideoFeedsFromRel') || 0,
                intention: 'video-feeds-log',
                feedVideoGroup: F.context('feedVideoGroup'),
                showVideoFeeds: F.context('showVideoFeeds'),
                seedVid: $('.mix-2').attr('seed-vid') || 'none',
                isPd: $('.mix-2').data('pd')
            }, otherData));
        }
        else {
            nslog(location.href, 2021, $.extend({
                module: 'article-n',
                page: 'index',
                pos: pos,
                action: 'show',
                wapDetailTest: F.context('wapDetailTest'),
                encEid: F.context('encEid'),
                strongCorrelation: F.context('strongCorrelation'),
                newVersion: F.context('newVersion'),
                recommendVideoData: F.context('recommendVideoData'),
                relateExpGroup: F.context('relateExpGroup'),
                showVideoFeedsFromRel: F.context('showVideoFeedsFromRel') || 0
            }, otherData));
        }
        if (pos === 'read-whole-mask' || pos === 'readed-whole'
            || pos === 'outer-to-baidu') {
            expSend({
                pos: pos,
                action: 'show',
                isToutiao: isToutiao,
                isFrTT: isFrTT,
                destGroup: F.context('destGroup')
            });
        }
        // 此处用于知识营销打点处理，必须打点，知识营销侧需要统计展现量
        if (pos === 'relate-exp-ad-mix-4' || pos === 'relate-exp-ad-text-4') {
            var adpvUrl = $(selector).attr('data-adpv');
            var script = document.createElement('script');
            script.src = adpvUrl;
            $(document.body).append(script);
        }
    }
}

function throttle(func, wait, options) {
    var context;
    var args;
    var result;
    var timeout = null;
    var previous = 0;
    if (!options) {
        options = {};
    }
    var later = function () {
        previous = options.leading === false ? 0 : Date.now();
        timeout = null;
        result = func.apply(context, args);
        if (!timeout) {
            context = args = null;
        }
    };
    return function () {
        var now = Date.now();
        if (!previous && options.leading === false) {
            previous = now;
        }
        var remaining = wait - (now - previous);
        context = this;
        args = arguments;
        if (remaining <= 0 || remaining > wait) {
            if (timeout) {
                clearTimeout(timeout);
                timeout = null;
            }
            previous = now;
            result = func.apply(context, args);
            if (!timeout) {
                context = args = null;
            }
        }
        else if (!timeout && options.trailing !== false) {
            timeout = setTimeout(later, remaining);
        }
        return result;
    };
}

exports.init = init;
 
});
;define("article-n:widget/v2017/exp-head/douwan-banner/douwan-banner.es",function(e,n,t){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function a(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(n,t,o){return t&&e(n.prototype,t),o&&e(n,o),n}}(),r=e("common:widget/lib/gmu/zepto/zepto.js"),u=o(r),l=e("common:widget/ui/nslog/nslog.js"),c=o(l),d=function(){function e(n){a(this,e),this.eventHandler(n)}return i(e,[{key:"eventHandler",value:function(e){u["default"](".douwan-banner").on("click",function(n){n.preventDefault();var t=u["default"](n.currentTarget).attr("href");c["default"](location.href,2021,{module:"article-n",page:"index",pos:"douwan-banner",action:"click",encEid:F.context("encEid"),intention:"video-feeds-log",wapDetailTest:F.context("wapDetailTest"),seedVid:e},!0,t)}),c["default"](location.href,2021,{module:"article-n",page:"index",pos:"douwan-banner",action:"show",encEid:F.context("encEid"),intention:"video-feeds-log",wapDetailTest:F.context("wapDetailTest"),seedVid:e})}}]),e}();n["default"]=d,t.exports=n["default"]});
;define("article-n:widget/v2017/exp-head/exp-head.js",function(o,e,t){function n(o){""!==o&&(r(o),F.context("gifCover",1));var e=d("#abstract-wp"),t=d("#abstract"),n=d("#arrow-wp"),i=F.context("strongCorrelation"),c=F.context("certFrom");d(".mask-img").height(d(".img-wrapper .img").height()),d(".close-icon").on("click",function(){d(".warning").hide(),d(".wp").removeClass("warning-wp"),d(".wgt-step-common").removeClass("warning-content"),F.context("warningClosed",!0)}),d(".author-uhome").on("click",function(){s(location.href,2021,{module:"article-n",page:"index",action:"click",pos:"author-avatar",eidEnc:F.context("eidEnc")})}),1===c&&s(location.href,2021,{module:"article-n",page:"index",action:"show",pos:"follow-btn",eidEnc:F.context("eidEnc")}),i&&s(location.href,2021,{module:"article-n",page:"index",pos:"video-reco-show",action:"show",strongCorrelation:i,wapDetailTest:F.context("wapDetailTest"),newVersion:F.context("newVersion"),recommendVideoData:F.context("recommendVideoData")}),f.on("like-status-change",function(){var o=d(".img-wrapper-footer .like-num");o.text(m.formatNum(+F.context("likeNum")))}),t.height()>84&&(t.addClass("small"),n.show()),n.on("click",function(o){o.preventDefault(),e.addClass("big"),t.removeClass("small"),n.hide(),d("#abstract").find("a").css("width","100%"),f.emit("calculateTop"),s(location.href,2021,{module:"article-n",page:"index",pos:"abstract-arrow",action:"click",recommendVideoData:F.context("recommendVideoData")})}),d(".wgt-exp-head").on("click",".tag",function(){s(location.href,2021,{module:"article-n",page:"index",pos:"tag",action:"click",recommendVideoData:F.context("recommendVideoData")})}),d(".article-feed-btn").on("click",function(o){var e="to-feed";1===w&&(e="btn-goto-zhihuijinnang"),s(location.href,2021,{pos:e,action:"click"},!0,d(o.currentTarget).data("url"))}),d(".article-feed-btn-fixed").on("click",function(o){var e="to-feed-fixed";1===w&&(e="btn-goto-zhihuijinnang-fixed"),s(location.href,2021,{pos:e,action:"click"},!0,d(o.currentTarget).data("url"))}),p.on("click",u(function(){var o=p.hasClass("followed"),e={method:"followBjhAuthor",BdStoken:F.context("BdsToken"),bdstt:F.context("bdstt"),bjhAppId:F.context("bjhAppId"),type:"follow",sidEnc:"",eidEnc:F.context("eidEnc")};g({type:"POST",url:"/common/isLogin/?_t="+ +new Date,dataType:"json"}).then(function(t){if(0===t.errno)return void a(o,e);var n=location.href.indexOf("?")>-1?"&":"?",i=location.href+n+"#bottom";location.href="https://wappass.baidu.com/passport/?u="+encodeURIComponent(i)+"&tpl=exp"})},500))}function i(o){g({type:"POST",url:"/submit/follow",data:o,dataType:"json"}).then(function(e){0===e.errno?c(o.type):(l(e.errno,o.type),c("cancle-loading"))})}function a(o,e){o?(e.type="unfollow",c("loading"),i(e)):(e.type="follow",c("loading"),i(e))}function c(o){var e={module:"article-n",page:"index",action:"click",pos:"follow-btn",cancleFollow:0,eidEnc:F.context("eidEnc")};switch(o){case"follow":return p.removeClass("loading"),p.addClass("followed"),void s(location.href,2021,e);case"unfollow":return p.removeClass("loading"),p.removeClass("followed"),e.cancleFollow=1,void s(location.href,2021,e);case"loading":return void p.addClass("loading");case"cancle-loading":return void p.removeClass("loading")}}function l(o,e){var t=d(".follow-tip-text"),n=t.parent();n.show(),10000006===+o?t.text("关注用户已超上限"):"follow"===e?t.text("关注失败，请重试"):"unfollow"===e&&t.text("取消关注失败，请重试"),setTimeout(function(){n.hide()},1500)}function r(o){var e=new Image;e.onload=function(){if(e.width>0&&e.height>0){var t='<div class="video-img video-img-gif" style=background-image:url(';t+=o+")></div>",d(".wgt-exp-video .video-img").before(t).fadeOut(700),F.context("alreadyGif",1)}},e.onerror=function(){},e.src=o}var d=o("common:widget/lib/gmu/zepto/zepto.js"),s=o("common:widget/ui/nslog/nslog.js"),f=o("common:widget/js/util/event/event.es").event,m=o("article-n:widget/v2017/js/ui/like-dislike-act/like-dislike-act.js"),u=o("common:widget/js/util/tool/tool.es").throttle,g=o("common:widget/js/util/ajax/ajax.es").ajax,p=d(".wgt-exp-head .follow-btn"),w=F.context("isBrand");t.exports.init=n});
;define("article-n:widget/v2017/exp-head/exp-izhishi-video/exp-izhishi-video-showcase.es",function(){"use strict"});
;define("article-n:widget/v2017/video-feeds/video-ad.es",function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(){var e=this,t=this.options,i=t.container,n=t.duration,o=t.endCallback,a=d(i),r=l(a);a&&r&&(t.movieBox=a,t.videoBox=r,c.call(this),p.call(this,{endCallback:o}),h.call(this),this.listenTime=setTimeout(function(){return b.call(e,null,o)},n))}function a(){var e=this,t=this.options,i=t.container,n=t.duration,o=t.endCallback,a=d(i),r=l(a);a&&r&&(t.movieBox=a,t.videoBox=r,u.call(this),p.call(this,{endCallback:o}),m.call(this),this.listenTime=setTimeout(function(){return b.call(e,null,o)},n))}function d(e){return document.querySelector(e)}function r(e){return e.querySelector("#videoAdImageSet")}function l(e){return e.querySelector("video")}function s(e,t){return window.apex&&window.apex.ck&&t?window.apex.ck.addCkOnUrl(e,t):e}function c(){var e=this,t=this.options,i=v(t,1);t.movieBox.insertAdjacentHTML("beforeend",i),f(t.duration,t.imageList),t.videoBox.style.display="none",this.countDownTimer=setInterval(function(){return g.call(e)},1e3)}function u(){var e=this,t=this.options,i=v(t,2);t.movieBox.insertAdjacentHTML("beforeend",i),f(t.duration,t.imageList),this.countDownTimer=setInterval(function(){return g.call(e)},1e3)}function v(e,t){var i=e.duration/1e3,n=e.title||"";return'<a class="video-ad-box" id="videoAdAfterBox" href="'+e.link+'">'+(1===t?'<div class="video-ad-image-set" id="videoAdImageSet"></div>':"")+(n?'<div class="video-ad-title-bar"><p class="video-ad-title">'+e.title+"</p></div>":"")+('<div class="video-ad-btn video-ad-duration-text" id="videoAdClose">\n        <span>'+i+'</span>s<b>丨</b>关闭广告</div>\n      <div class="video-ad-btn video-ad-link-text">查看详情</div>\n      <div class="video-ad-progress">\n        <div class="video-ad-buffered"></div>\n        <div class="video-ad-played" id="videoAdProgress"></div>\n      </div>\n    </a>')}function f(e,t){var i=document.createElement("style"),n=t[0];i.type="text/css",i.innerHTML='.video-ad-box{width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:2;}\n    .video-ad-image-set{width:100%;height:100%;background-image:url("'+n+'");\n    background-repeat:no-repeat;background-position:center;background-size:cover;}\n    .video-ad-progress{background:rgba(0,0,0,.3);width:100%;height:2px;position:absolute;\n    bottom:0;left:0;opacity:1;transition:opacity 500ms;}\n    .video-ad-progress .video-ad-buffered{background:#e7e7e7;\n    height:100%;position:absolute;top:0;left:0;z-index:1;}\n    .video-ad-progress .video-ad-played{background:#3c76ff;height:100%;\n    position:absolute;top:0;left:0;z-index:2;width:0;\n    transition:width '+e+"ms linear;-moz-transition:width "+e+"ms linear;\n    -webkit-transition:width "+e+"ms linear;-o-transition:width "+e+"ms linear;}\n    .video-ad-box .video-ad-btn{position:absolute;bottom:10px;font-size:12px;\n    color:#fff;padding:4px 15px;background:rgba(0,0,0,0.4);\n    border-radius:15px;}\n    .video-ad-box .video-ad-duration-text{padding-left:4px;left:17px;}\n    .video-ad-box .video-ad-link-text{right:8px;}\n    .video-ad-box .video-ad-duration-text span{display:inline-block;width:22px;\n    text-align:right;padding-right:1px;}\n    .video-ad-box .video-ad-duration-text b{display:inline-block;width:13px;text-align:center;\n    font-weight:normal;color:#a6a7a4;}\n    .video-ad-box .video-ad-title-bar{position:absolute;top:0;left:0;width:100%;\n    height:65px;background-image:linear-gradient(0deg,rgba(0,0,0,0.00) 0%,rgba(0,0,0,0.66) 67%);}\n    .video-ad-box .video-ad-title-bar .video-ad-title{color:#ffffff;font-size:15px;\n    width:90.9%;line-height:25px;margin:10px auto 0;overflow:hidden;text-overflow:ellipsis;\n    display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;}",document.head.appendChild(i)}function p(e){var t=this,i=this.options,n=document.getElementById("videoAdClose"),o=document.getElementById("videoAdAfterBox");n.addEventListener("click",function(i){i.preventDefault(),b.call(t,i,e.endCallback)},!1),o.addEventListener("click",function(e){var t=e.currentTarget.getAttribute("href"),n=s(t,i.imTimeSign);e.currentTarget.setAttribute("href",n)},!1)}function h(){for(var e=this,t=this.options,i=r(t.movieBox),n=t.imageList.length,o=Math.round(t.duration/n),a=document.getElementById("videoAdProgress"),d=function(n){e.runTime=setTimeout(function(){i.style.backgroundImage="url("+t.imageList[n]+")"},n*o)},l=0,s=n;s>l;l++)d(l,s);setTimeout(function(){a.style.width="100%"},10)}function m(){var e=this.options,t=e.videoBox,i=e.video,n=document.getElementById("videoAdProgress");this.originLink=t.src,t.src=i,setTimeout(function(){n.style.width="100%",t.play()},10)}function g(){var e=document.getElementById("videoAdClose").querySelector("span"),t=e.innerHTML;t--,e.innerHTML=t,0===t&&clearInterval(this.countDownTimer)}function b(e,t){var i=this.options,n=document.getElementById("videoAdAfterBox");if(i&&i.movieBox.contains(n)){if(e&&e.currentTarget&&e.currentTarget.parentElement){var o=e.currentTarget.parentElement;o.parentNode.removeChild(o)}else n.parentNode.removeChild(n);i.video||(i.videoBox.style.display="block"),clearTimeout(this.runTime),clearTimeout(this.listenTime),clearInterval(this.countDownTimer)}"function"==typeof t&&t()}Object.defineProperty(t,"__esModule",{value:!0});var x=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),k=function(){function e(){n(this,e),this.runTime=null,this.listenTime=null,this.countDownTimer=null}return x(e,[{key:"adSet",value:function(e){e.container=e.container||"",e.imageList=e.imageList||[],e.video=e.video||"",e.title=e.title||"",e.link=e.link||"",e.duration=e.duration||3e3,e.endCallback=e.endCallback||null,e.ck=e.ck||!0,this.options=e,e.video?a.call(this):o.call(this)}},{key:"close",value:function(e){b.call(this,null,e)}}]),e}();t["default"]=k,i.exports=t["default"]});
;define("article-n:widget/v2017/video-feeds/feedback/feedback.es",function(require,exports,module){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,i,a){return i&&e(t.prototype,i),a&&e(t,a),t}}(),_commonWidgetLibGmuZeptoZeptoJs=require("common:widget/lib/gmu/zepto/zepto.js"),_commonWidgetLibGmuZeptoZeptoJs2=_interopRequireDefault(_commonWidgetLibGmuZeptoZeptoJs),_commonWidgetLibGmuDialogDefaultDialogDefaultJs=require("common:widget/lib/gmu/dialog.default/dialog.default.js"),_commonWidgetLibGmuDialogDefaultDialogDefaultJs2=_interopRequireDefault(_commonWidgetLibGmuDialogDefaultDialogDefaultJs),_commonWidgetJsUtilAjaxAjaxEs=require("common:widget/js/util/ajax/ajax.es"),_commonWidgetUiNslogNslogJs=require("common:widget/ui/nslog/nslog.js"),_commonWidgetUiNslogNslogJs2=_interopRequireDefault(_commonWidgetUiNslogNslogJs);require("common:widget/js/util/template/template.es");var VideoFeedback=function(){function VideoFeedback(e){_classCallCheck(this,VideoFeedback),this.eid=e.eid,this.seedVid=e.seedVid,this.feedVid=e.feedVid,this.triggerFrom=e.triggerFrom,this.init()}return _createClass(VideoFeedback,[{key:"init",value:function init(){var me=this,feedbackTpl=function render(data){var keyArr=[],valArr=[];data=data||{},data.__encodeHTML__=window.template.__encodeHTML;for(var key in data)keyArr.push('"'+key+'"'),valArr.push(data[key]);var source="new Function("+keyArr.join(",")+', "\\"use strict\\";var __code__ = \\"\\";;__code__ += (\\"<div class=\\\\\\"video-feedback\\\\\\">     <div style=\\\\\\"display:none\\\\\\"><iframe name=\\\\\\"mainframe\\\\\\" target=\\\\\\"_self\\\\\\" id=\\\\\\"mainframe\\\\\\"></iframe></div>     <form id=\\\\\\"form\\\\\\" method=\\\\\\"post\\\\\\" action=\\\\\\"//ufo.baidu.com/listen/api/addfeedback\\\\\\" target=\\\\\\"mainframe\\\\\\" enctype=\\\\\\"multipart/form-data\\\\\\">         <div class=\\\\\\"title\\\\\\">问题类型</div>         <div class=\\\\\\"feedback-list\\\\\\" id=\\\\\\"feedback-list\\\\\\">             <div class=\\\\\\"feedback-item\\\\\\" data-text=\\\\\\"A\\\\\\">匹配错误，视频与经验词条不匹配</div>             <div class=\\\\\\"feedback-item\\\\\\" data-text=\\\\\\"B\\\\\\">视频内容无法解决实际问题</div>             <div class=\\\\\\"feedback-item\\\\\\" data-text=\\\\\\"C\\\\\\">视频内容制作粗暴、包含违禁信息等</div>             <div class=\\\\\\"feedback-item last\\\\\\" data-text=\\\\\\"D\\\\\\">视频无法正常播放</div>             <input type=\\\\\\"hidden\\\\\\" name=\\\\\\"description\\\\\\" id=\\\\\\"description\\\\\\">             <input type=\\\\\\"hidden\\\\\\" name=\\\\\\"product_line\\\\\\" id=\\\\\\"product_line\\\\\\">             <input type=\\\\\\"hidden\\\\\\" name=\\\\\\"extend_feedback_channel\\\\\\" id=\\\\\\"extend_feedback_channel\\\\\\">         </div>         <div class=\\\\\\"error-section\\\\\\"><span>请选择问题类型</span></div>     </form> </div>\\");return __code__")';try{var fn=eval(source),html=fn.apply(null,valArr)}catch(e){return e.name="RenderError",e.tpl="article-n:widget/v2017/video-feeds/feedback/feedback.tmpl",window.template.__handelError(e),"template.js error"}return html};this.feedbackDialog=_commonWidgetLibGmuDialogDefaultDialogDefaultJs2["default"]({content:feedbackTpl,maskClick:function(){this.close()},preventMaskScroll:!0,closeBtn:!1,buttons:{"取消":function(){this.close()},"提交":function(){me.submitHandler()}}}),this.wrapper=this.feedbackDialog.getWrap(),this.btn=this.wrapper.find(".ui-dialog-btns .ui-btn-2"),this.errorInfo=this.wrapper.find(".error-section span"),this.eventHandler(),this.frameHandler()}},{key:"submitHandler",value:function(){if(this.btn.hasClass("active")){if(this.btn.hasClass("active")&&this.wrapper.find(".feedback-item.active").length){var e=this.getSelectedItems();this.wrapper.find("#product_line").val("90599"),this.wrapper.find("#extend_feedback_channel").val("33318"),this.wrapper.find("#description").val(this.eid+"/"+this.seedVid+"/"+this.feedVid+"/"+e),this.wrapper.find("#form").submit(),this.feedbackDialog.close(),_commonWidgetUiNslogNslogJs2["default"](location.href,2021,{module:"article-n",page:"index",pos:"video-feedback-submit",action:"click",encEid:this.eid,seedVid:this.seedVid,feedsVid:this.feedVid,intention:"video-feeds-log",feedVideoGroup:F.context("feedVideoGroup"),feedVideoExpGroup:F.context("feedVideoExpGroup"),triggerFrom:this.triggerFrom})}}else this.errorInfo.show()}},{key:"eventHandler",value:function(){var e=this,t=this.wrapper.find(".feedback-item");t.off("click").on("click",function(t){_commonWidgetLibGmuZeptoZeptoJs2["default"](t.target).toggleClass("active"),e.wrapper.find(".feedback-item.active").length?(e.btn.addClass("active"),e.errorInfo.hide()):e.btn.removeClass("active")})}},{key:"frameHandler",value:function(){var e=this;this.wrapper.find("#mainframe").off("load").on("load",function(){e.controlMsgTip("反馈成功")})}},{key:"controlMsgTip",value:function(e){var t=_commonWidgetLibGmuZeptoZeptoJs2["default"](".tip-text");t.text(e),t.show(),setTimeout(function(){t.hide()},1500)}},{key:"getSelectedItems",value:function(){var e=this.wrapper.find(".feedback-item.active"),t=[];return e.each(function(e,i){t.push(_commonWidgetLibGmuZeptoZeptoJs2["default"](i).data("text"))}),t.join("")}},{key:"closeDialog",value:function(){this.feedbackDialog&&this.feedbackDialog.close()}}]),VideoFeedback}();exports["default"]=VideoFeedback,module.exports=exports["default"]});
;define("article-n:widget/v2017/video-feeds/ck.js",function(){function n(){function n(n){return x=document.body,b=0,y=0,A=0,O=0,C=0,M=0,S=0,Y=0,j=0,N=0,q="none",X=0,D=0,H="none",T=0,U=0,W=0,z=0,F=0,G=0,B=n,e(),{addCkOnUrl:w,clearCount:p,addAdsCk:g}}function e(){x.removeEventListener("touchstart",t),x.removeEventListener("touchend",r,!0),x.removeEventListener("touchmove",o,!0),x.removeEventListener("click",u,!0),window.removeEventListener("scroll",i,!0),x.addEventListener("touchstart",t,!0),x.addEventListener("touchend",r,!0),x.addEventListener("touchmove",o,!0),x.addEventListener("click",u,!0),window.addEventListener("scroll",i,!0)}function t(n){var e=n.touches.item(0);O=parseInt(e.pageX,10),C=parseInt(e.pageY,10),a(),b=l(n),c(n)}function r(n){y=l(n),A=y>b?Math.round(y-b):0,c(n)}function o(n){i(n)}function i(n){I||(I=!0,S=window.scrollY);var e=window.scrollY,t=Math.abs(e-M),r=d(M,e)||q,o=l(n);f(t,r)&&(o>j&&(j=o),"none"===H&&(H=q,Y=o),H!==q&&(v(),Y=o,H=q)),M=e}function u(n){T=l(n),U=n.pageX,W=n.pageY,c(n)}function c(n){var e=h(n.target,B);e&&(F=e.offsetWidth,G=e.offsetHeight)}function a(){I&&"none"!==H&&(v(),D=0,I=!1,q="none")}function f(n,e){return"none"===q&&(q=e),e!==q?(q=e,D=0):D+=n,D>J}function d(n,e){return e>n?"up":n>e?"down":!1}function v(){X++,N+=Math.round(j-Y),H="none"}function l(n){if(0!==n.timeStamp)return n.timeStamp;var e=new Date;return e.getTime()}function s(n,e){for(var t=0,r=n.length;r>t;t++)if(n[t]===e)return!0;return!1}function h(n,e){for(var t=document.querySelectorAll(e),r=n.parentNode;r&&!s(t,r);)r=r.parentNode;return r}function w(n,e,t){var r=k(n,e,t),o=/&ck=[\w.]*/;return r===!1?n:(-1===n.indexOf("&ck=")?n+="&ck="+r:n=n.replace(o,"&ck="+r),n)}function p(){X=0,N=0}function g(n,e){for(var t,r=n.length-1;r>=0;r--){t=n[r].querySelectorAll("a");for(var o=t.length-1;o>=0;o--){var i=t[o];"A"===i.tagName&&""!==i.href&&-1!==i.href.indexOf("baidu")&&(m(i,e,1),i.addEventListener("touchend",function(){T=0,U=0,W=0,m(this,e)},!0),i.addEventListener("click",function(){m(this,e),p()},!0))}}}function m(n,e,t){n.href=w(n.href,e,t)}function k(n,e,t){if("string"!=typeof n)return!1;if(-1===n.indexOf("baidu.php?url=")&&-1===n.indexOf("link?url="))return!1;if(1===t)return"0.0.0.0.0.0.0.0.0.0.0";var r;if(r=E(n,e,A,O),r===!1)return!1;z=0,T>0&&T>y&&(z=Math.round(T-y));var o=[r,A,O,C,F,G,X,N,z,U,W].join(".");return o}function E(n,e,t,r){var o,i=/\?url=([^.]+)\./,u=/link\?url=([^&]+)/,c=0;if(o=u.exec(n)||i.exec(n)){var a=t*e%99+9,f=o[1].length;u.exec(n)&&(f=o[1].length<20?o[1].length:20);for(var d=0;a>d;++d)c+=o[1].charCodeAt(r*d%f);return c}return!1}var L,x,b,y,A,O,C,I,M,S,Y,j,N,q,X,D,H,T,U,W,z,B,F,G,J=10;return{getInstance:function(e){return L||(L=n(e)),L}}}"object"==typeof window&&(window.apex=window.apex||{},window.apex.ck=n().getInstance())});
;define("article-n:widget/v2017/video-feeds/video-feeds.es",function(require,exports,module){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}function _classCallCheck(e,i){if(!(e instanceof i))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _extends=Object.assign||function(e){for(var i=1;i<arguments.length;i++){var t=arguments[i];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},_createClass=function(){function e(e,i){for(var t=0;t<i.length;t++){var o=i[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(i,t,o){return t&&e(i.prototype,t),o&&e(i,o),i}}(),_commonWidgetLibGmuZeptoZeptoJs=require("common:widget/lib/gmu/zepto/zepto.js"),_commonWidgetLibGmuZeptoZeptoJs2=_interopRequireDefault(_commonWidgetLibGmuZeptoZeptoJs),_commonWidgetLibLodashLodashJs=require("common:widget/lib/lodash/lodash.js"),_commonWidgetLibLodashLodashJs2=_interopRequireDefault(_commonWidgetLibLodashLodashJs),_articleNWidgetV2017VideoFeedsVideoAdEs=require("article-n:widget/v2017/video-feeds/video-ad.es"),_articleNWidgetV2017VideoFeedsVideoAdEs2=_interopRequireDefault(_articleNWidgetV2017VideoFeedsVideoAdEs),_commonWidgetExpVideoPlayerExpVideoPlayerEs=require("common:widget/exp-video-player/exp-video-player.es"),_commonWidgetExpVideoPlayerExpVideoPlayerEs2=_interopRequireDefault(_commonWidgetExpVideoPlayerExpVideoPlayerEs),_articleNWidgetV2017VideoFeedsFeedbackFeedbackEs=require("article-n:widget/v2017/video-feeds/feedback/feedback.es"),_articleNWidgetV2017VideoFeedsFeedbackFeedbackEs2=_interopRequireDefault(_articleNWidgetV2017VideoFeedsFeedbackFeedbackEs),util=require("article-n:widget/v2017/js/util/util.es"),animation=require("article-n:widget/v2017/js/ui/animation/animation.js"),nslog=require("common:widget/ui/nslog/nslog.js");require("common:widget/ui/lazyload/lazyload.js"),require("article-n:widget/v2017/video-feeds/ck.js");var globalConst={defaultString:"-",defaultNumber:0,screenWidth:util.getScreenWidth(),screenHeight:util.getScreenHeight(),useragentInfo:util.getUaInfo(),isHttps:"https:"===window.location.protocol,originalUrl:window.location.href,erroNo:10001},firstOpen={"exp-cover":1,"feeds-1":1,"feeds-2":1},isAndroid=!1,isShouBaiIOS=!1,ua=window.navigator.userAgent.toLowerCase();"micromessenger"==ua.match(/MicroMessenger/i)&&(isAndroid=!0),/baiduboxapp/.test(navigator.userAgent.toLowerCase())&&"undefined"==typeof Box&&!isAndroid&&(isShouBaiIOS=!0);var validFlag=!1,feedItemTmpl=function render(data){var keyArr=[],valArr=[];data=data||{},data.__encodeHTML__=window.template.__encodeHTML;for(var key in data)keyArr.push('"'+key+'"'),valArr.push(data[key]);var source="new Function("+keyArr.join(",")+', "\\"use strict\\";var __code__ = \\"\\";;__code__ += (\\"\\");list.forEach(function(videoItem) {;__code__ += (\\"     <li class=\\\\\\"bk-common-video-list__item video-item J-video video-\\");__code__ += (__encodeHTML__(typeof (videoItem.itemIndex) === \\"undefined\\" ? \\"\\" : videoItem.itemIndex));__code__ += (\\" vid-\\");__code__ += (__encodeHTML__(typeof (videoItem.feedVid) === \\"undefined\\" ? \\"\\" : videoItem.feedVid));__code__ += (\\"\\\\\\" video-feeds-num=\\\\\\"\\");__code__ += (__encodeHTML__(typeof (videoItem.itemIndex) === \\"undefined\\" ? \\"\\" : videoItem.itemIndex));__code__ += (\\"\\\\\\" src=\\\\\\"\\");__code__ += (__encodeHTML__(typeof (videoItem.playUrl) === \\"undefined\\" ? \\"\\" : videoItem.playUrl));__code__ += (\\"\\\\\\" video-duration=\\\\\\"\\");__code__ += (__encodeHTML__(typeof (videoItem.duration) === \\"undefined\\" ? \\"\\" : videoItem.duration));__code__ += (\\"\\\\\\" vid=\\\\\\"\\");__code__ += (__encodeHTML__(typeof (videoItem.feedVid) === \\"undefined\\" ? \\"\\" : videoItem.feedVid));__code__ += (\\"\\\\\\">         <div class=\\\\\\"bk-common-video-container-wrapper\\\\\\">             <div class=\\\\\\"bk-common-video-container video-cover-container\\\\\\" style=\\\\\\"width:100%\\\\\\">                 <img src=\\\\\\"\\");__code__ += (__encodeHTML__(typeof (videoItem.coverUrl) === \\"undefined\\" ? \\"\\" : videoItem.coverUrl));__code__ += (\\"\\\\\\" class=\\\\\\"bk-common-video-container__video-cover-image\\\\\\">                 <div class=\\\\\\"bk-common-video-container__second-mask\\\\\\"></div>                 <div class=\\\\\\"bk-common-video-container__player-icon-wrapper\\\\\\">                     <a href=\\\\\\"javascript:;\\\\\\" class=\\\\\\"wgt-play-icon\\\\\\">                         <em class=\\\\\\"layout-icons layout-icons_new-fullTriangle wgt-play-icon__triangle play-icon flash animated infinite\\\\\\"></em>                     </a>                 </div>                 <div class=\\\\\\"bk-common-video-info\\\\\\">                     <div class=\\\\\\"bk-common-video-addition\\\\\\">                         <div class=\\\\\\"bk-common-video-addition__play-number\\\\\\">                             <span class=\\\\\\"\\");__code__ += (__encodeHTML__(typeof (videoItem.feedVid) === \\"undefined\\" ? \\"\\" : videoItem.feedVid));__code__ += (\\"\\\\\\">\\");__code__ += (__encodeHTML__(typeof (videoItem.viewCountStr) === \\"undefined\\" ? \\"\\" : videoItem.viewCountStr));__code__ += (\\"</span> 次播放</div>                     </div>                 </div>                 <div class=\\\\\\"bk-common-video-container__video-duration\\\\\\">                     \\");__code__ += (__encodeHTML__(typeof (videoItem.durationStr) === \\"undefined\\" ? \\"\\" : videoItem.durationStr));__code__ += (\\"                 </div>             </div>             <div class=\\\\\\"bk-common-video-footer\\\\\\">                 <div class=\\\\\\"bk-common-video-info__title\\\\\\">                     \\");__code__ += (__encodeHTML__(typeof (videoItem.title) === \\"undefined\\" ? \\"\\" : videoItem.title));__code__ += (\\"                 </div>                 <span class=\\\\\\"footer-block\\\\\\">                     <b class=\\\\\\"author-portrait\\\\\\" style=\\\\\\"background-image: url(\\");__code__ += (__encodeHTML__(typeof (videoItem.authorInfo.avatar) === \\"undefined\\" ? \\"\\" : videoItem.authorInfo.avatar));__code__ += (\\");\\\\\\"></b>                     \\");__code__ += (__encodeHTML__(typeof (videoItem.authorInfo.displayName) === \\"undefined\\" ? \\"\\" : videoItem.authorInfo.displayName));__code__ += (\\"                 </span>                 \\");if (isFeedGroupA) {;__code__ += (\\"                 <span class=\\\\\\"video-feedback-section\\\\\\">                     <span class=\\\\\\"video-feedback-icon\\\\\\"></span>                     <span class=\\\\\\"video-feedback-text\\\\\\">反馈</span>                 </span>                 \\");};__code__ += (\\"             </div>         </div>     </li> \\");});return __code__")';try{var fn=eval(source),html=fn.apply(null,valArr)}catch(e){return e.name="RenderError",e.tpl="article-n:widget/v2017/video-feeds/feed-item.tmpl",window.template.__handelError(e),"template.js error"}return html},VideoFeeds=function(){function e(i){_classCallCheck(this,e),this.curIndex=0,this.feedList=i.feedList||[],this.wrapperEle=_commonWidgetLibGmuZeptoZeptoJs2["default"]("#wrapper"),this.videoFeedsWrapper=_commonWidgetLibGmuZeptoZeptoJs2["default"]("#videoFeedsWrapper"),this.playingVideoClassName="playingVideo",this.topNavBarHeight=_commonWidgetLibGmuZeptoZeptoJs2["default"](".bk-common-video-topbar__title").height()||44,this.playerTopPosition=-9999,this.flag80=!1,this.scrollShowMap={},this.alreadyShowMap={},this.alreadyPlayMap={},this.seedVid=0,this.feedsVid=F.context("feedsVid"),this.triggerFrom=i.from,this.setFeedsTrigger(),this.videoList=this.triggerDom.find(".J-video"),this.afterVideoAD=_commonWidgetLibGmuZeptoZeptoJs2["default"](".video-main-container").attr("after-ad"),this.videoListLen=this.videoList.length,this.isFullScreen=!1,this.afterADInfo={},this.afterADPlaying=!1,this.playTime=0,this.stopTime=0,this.validDuration=0,this.duration=0,this.feedOffset=F.context("videoFeedOffset"),this.feedTotal=F.context("videoFeedTotal"),this.feedGroup=F.context("feedVideoGroup"),this.tips=_commonWidgetLibGmuZeptoZeptoJs2["default"](".tips"),this.dataLoading=!1,this.feedHasMore=!0,this.videoFeedVidSet=new Set,this.init(this.triggerFrom),this.historyHandler(),this.processInitVideoFeedListData(this.feedList),this.feedOffset+=this.feedList.length,this.resizeBindThis=this.windowResize.bind(this)}return _createClass(e,[{key:"init",value:function(){document.body.scrollTop=document.documentElement.scrollTop=0,this.feedEid=_commonWidgetLibGmuZeptoZeptoJs2["default"](".video-main-container").attr("feed-eid"),this.feedListWrapper=_commonWidgetLibGmuZeptoZeptoJs2["default"](".video-list"),this.show(this.triggerFrom),this.initLog(),this.firstPlay(),this.eventHandler()}},{key:"windowResize",value:function(){var e=this.videoList.eq(this.getCurIndex());this.playerTopPosition=e.offset().top,this.putPlayerOnTargetPosition(this.playerTopPosition),this.player&&this.player.play()}},{key:"eventHandler",value:function(){var e=this;this.goBackHandler(),this.clickToPlayHandler(),this.endToPlayNext(),this.feedbackHandler(),window.onscroll=this.scrollHandler.bind(this),window.addEventListener("resize",this.resizeBindThis),this.player.addEventListener("timeupdate",function(){var i=e.player.currentTime,t=e.duration,o=Math.floor(.8*t);if(i>=3&&!validFlag&&(validFlag=!0),i>=o){if(e.flag80)return;var d=e.getCurIndex(),r=e.videoList.eq(d),n=r.attr("is-ad");"1"===n||e.afterADPlaying||nslog(location.href,2021,{module:"article-n",page:"index",pos:"video-feeds",action:"play-end-80",encEid:e.feedEid,feedsVid:e.feedsVid,intention:"video-feeds-log",firstOpen:firstOpen[e.triggerFrom],feedVideoGroup:e.feedGroup,feedVideoExpGroup:F.context("feedVideoExpGroup"),videoIndex:e.videoList.eq(e.getCurIndex()).attr("video-feeds-num"),triggerFrom:e.triggerFrom}),e.flag80=!0}else e.flag80=!1}),this.player.addEventListener("pause",function(){var i=e.player.currentTime,t=e.duration;e.stopTime=i;var o=(new Date).getTime()-e.playTime;e.validDuration=e.validDuration+o,0>o||nslog(location.href,2021,{module:"article-n",page:"index",pos:"video-feeds",action:"video-stop",encEid:e.feedEid,intention:"video-feeds-log",videoIndex:e.videoList.eq(e.getCurIndex()).attr("video-feeds-num"),feedVideoGroup:e.feedGroup,feedVideoExpGroup:F.context("feedVideoExpGroup"),firstOpen:firstOpen[e.triggerFrom],seedVid:e.seedVid,feedsVid:e.feedsVid,stopTime:i,playDuration:o/1e3,videoDuration:t,videoProducer:"jingyan",triggerFrom:e.triggerFrom})}),this.player.addEventListener("play",function(){var i=e.player.currentTime,t=e.duration,o=0,d=e.getCurIndex()||0;e.playTime=(new Date).getTime(),0==i&&(o=1),nslog(location.href,2021,{module:"article-n",page:"index",pos:"video-feeds",action:"video-play",seedVid:e.seedVid,videoIndex:e.videoList.eq(d).attr("video-feeds-num"),encEid:e.feedEid,intention:"video-feeds-log",feedVideoGroup:e.feedGroup,feedVideoExpGroup:F.context("feedVideoExpGroup"),firstOpen:firstOpen[e.triggerFrom],alreadyPlay:e.alreadyPlayMap[d]||0,feedsVid:e.feedsVid,playTime:i,videoProducer:"jingyan",playVv:o,videoDuration:t,triggerFrom:e.triggerFrom})}),this.player.addEventListener("error",function(e){var i={page:"index",pos:"video-feeds",action:"play-err",videoProducer:"jingyan",isAuto:1,isSuccess:0,errObj:JSON.stringify(e||{})};nslog(location.href,2021,i)});new _commonWidgetLibGmuZeptoZeptoJs2["default"].Lazyload(_commonWidgetLibGmuZeptoZeptoJs2["default"](".video-cover-container .lazy-img",this.triggerDom),{preloadHeight:_commonWidgetLibGmuZeptoZeptoJs2["default"](".bk-common-video-list__item",this.triggerDom).eq(0).height()})}},{key:"toNextVide",value:function(){var e=this;this.stopVideo(),this.flag80=!1;var i=this.getCurIndex(),t=i+1,o=this.videoList.eq(t),d=o.attr("video-feeds-num");if(o.hasClass("J-video")){var r=o.offset().top-this.topNavBarHeight;this.scrollTo(r,function(){e.playVideo(t),e.nslogAutoPlay({module:"article-n",page:"index",pos:"video-feeds",action:"auto-play",seedVid:e.seedVid,alreadyPlay:e.alreadyPlayMap[t]||0,encEid:e.feedEid,feedsVid:e.feedsVid,intention:"video-feeds-log",feedVideoGroup:e.feedGroup,feedVideoExpGroup:F.context("feedVideoExpGroup"),firstOpen:firstOpen[e.triggerFrom],videoIndex:d,triggerFrom:e.triggerFrom})})}}},{key:"playNextVideo",value:function(){var e=this,i=this.getCurIndex(),t=this.videoList.eq(i),o=t.attr("is-ad");if(this.isFullScreen||"1"===o||"0"===this.afterVideoAD)this.toNextVide();else{var d=this.afterADInfo.isVideo,r=this.afterADInfo.imTimeSign;if(0===d)if(this.afterADInfo.picUrl){this.afterADPlaying=!0;var n={imageList:this.afterADInfo.picUrl,link:this.afterADInfo.landUrl,title:this.afterADInfo.title,container:".exp-video-player",duration:1e4,imTimeSign:r,endCallback:function(){e.toNextVide()}};this.videoAd.adSet(n)}else this.toNextVide();else if(1===d){if(this.afterADInfo.videoUrl){var a=1e3*this.afterADInfo.duration;isNaN(a)?a=5e3:a>15e3&&(a=15e3),this.afterADPlaying=!0;var n={video:this.afterADInfo.videoUrl,link:this.afterADInfo.landUrl,container:".exp-video-player",title:this.afterADInfo.title,duration:a,imTimeSign:r,endCallback:function(){e.toNextVide()}};this.videoAd.adSet(n)}}else this.toNextVide()}}},{key:"endToPlayNext",value:function(){var e=this;this.player.addEventListener("ended",function(){e.playNextVideo();var i=e.getCurIndex(),t=e.videoList.eq(i).attr("video-feeds-num"),o=e.videoList.eq(i),d=o.attr("is-ad");"1"===d||e.afterADPlaying||nslog(location.href,2021,{module:"article-n",page:"index",pos:"video-feeds",action:"play-end-100",encEid:e.feedEid,feedsVid:e.feedsVid,intention:"video-feeds-log",feedVideoGroup:e.feedGroup,feedVideoExpGroup:F.context("feedVideoExpGroup"),firstOpen:firstOpen[e.triggerFrom],videoIndex:t,triggerFrom:e.triggerFrom})})}},{key:"clickToPlayHandler",value:function(){var e=this;_commonWidgetLibGmuZeptoZeptoJs2["default"](".video-list").off("click",".video-cover-container").on("click",".video-cover-container",function(){var i=_commonWidgetLibGmuZeptoZeptoJs2["default"](this).parents(".video-item"),t=i.attr("video-feeds-num"),o=i.index();e.stopVideo(),e.playVideo(o);var d=e.videoList.eq(o),r=+d.attr("video-duration"),n=d.attr("is-ad");"1"!==n&&nslog(location.href,2021,{module:"article-n",page:"index",pos:"video-feeds",action:"click-play",seedVid:e.seedVid,alreadyPlay:e.alreadyPlayMap[o]||0,encEid:this.feedEid,feedsVid:e.feedsVid,intention:"video-feeds-log",feedVideoGroup:this.feedGroup,feedVideoExpGroup:F.context("feedVideoExpGroup"),firstOpen:firstOpen[e.triggerFrom],videoIndex:t,triggerFrom:e.triggerFrom,videoDuration:r,videoProducer:"jingyan"})})}},{key:"show",value:function(){return window.removeEventListener("resize",this.resizeBindThis),this.wrapperEle.children().hide(),this.videoFeedsWrapper.show(),_commonWidgetLibGmuZeptoZeptoJs2["default"](".J-list-container").find(".video-list").hide(),this.triggerDom.show(),_commonWidgetLibGmuZeptoZeptoJs2["default"]("body").addClass("dark-bg"),_commonWidgetLibGmuZeptoZeptoJs2["default"]("html").addClass("dark-bg"),this}},{key:"hide",value:function(){window.removeEventListener("resize",this.resizeBindThis),this.player.pause(),this.wrapperEle.children().show(),_commonWidgetLibGmuZeptoZeptoJs2["default"]("body").removeClass("dark-bg"),_commonWidgetLibGmuZeptoZeptoJs2["default"]("html").removeClass("dark-bg"),_commonWidgetLibGmuZeptoZeptoJs2["default"](".video-feeds-container").length&&_commonWidgetLibGmuZeptoZeptoJs2["default"](".video-feeds-container").remove(),this.videoFeedsWrapper.hide(),document.body.scrollTop=document.documentElement.scrollTop="exp-cover"===this.triggerFrom?0:_commonWidgetLibGmuZeptoZeptoJs2["default"](".wgt-rel-exp").offset().top}},{key:"firstPlay",value:function(){this.createVideoEle(),this.playVideo(0),this.scrollHandler()}},{key:"getAdInfo",value:function(e,i){var t=this;"1"===this.afterVideoAD&&!function(){t.afterADInfo={};var o=t,d=t.feedList[i],r="";d&&(r=d.title),_commonWidgetLibGmuZeptoZeptoJs2["default"].ajax({type:"get",url:"/article/ajax/getAfterVideo",data:{feedVid:e,query:r,encodeEid:t.feedEid},dataType:"json",success:function(e){e&&0===e.errno&&(o.afterADInfo=e.data||{})}})}()}},{key:"playVideo",value:function(e){var i=this;this.afterADPlaying=!1,this.videoAd.close();var t=_commonWidgetLibGmuZeptoZeptoJs2["default"](this.player),o=this.videoList.eq(e),d=o.attr("src"),r=o.attr("is-ad");if(this.isFullScreen&&"1"===r)this.toNextVide();else if("1"===r){this.afterADInfo={};var n=o.attr("is-video"),a=o.attr("land-url"),s=o.attr("video-time");if("0"===n){var l=o.attr("pic-url");this.videoAd.adSet({imageList:[l],link:a,container:".exp-video-player",duration:1e4,imTimeSign:s,endCallback:function(){i.toNextVide()}})}else if("1"===n){var f=1e3*o.attr("video-duration");isNaN(f)?f=5e3:f>15e3&&(f=15e3),this.videoAd.adSet({video:d,link:a,container:".exp-video-player",title:"",duration:f,imTimeSign:s,endCallback:function(){i.toNextVide()}});var p=t[0].play();void 0!==p&&p.then(function(){video.pause()})["catch"](function(){})}}else{t.attr("src",d);var p=t[0].play();void 0!==p&&p.then(function(){video.pause()})["catch"](function(){});var c=o.attr("vid");this.getAdInfo(c,e)}this.playerTopPosition=o.offset().top,this.putPlayerOnTargetPosition(this.playerTopPosition),this.duration=+o.attr("video-duration"),this.setCurIndex(e),this.setPlayingSign(o),setTimeout(function(){i.alreadyPlayMap[e]=1})}},{key:"putPlayerOnTargetPosition",value:function(e){"static"===this.playerContainer.css("position")&&this.playerContainer.css("position","absolute"),this.playerContainer.css("top",e+"px")}},{key:"setCurIndex",value:function(e){var i=parseInt(e,10),t=isNaN(i)?"error_index_"+e:i;this.curIndex=t}},{key:"getCurIndex",value:function(){return this.curIndex||0}},{key:"setPlayingSign",value:function(e){_commonWidgetLibGmuZeptoZeptoJs2["default"].zepto.isZ(e)&&e.length>0&&(e.addClass(this.playingVideoClassName),this.playingElemOffset=e.offset(),this.feedsVid=e.attr("vid"))}},{key:"removePlayingSign",value:function(e){_commonWidgetLibGmuZeptoZeptoJs2["default"].zepto.isZ(e)&&e.length>0&&(e.removeClass(this.playingVideoClassName),this.playingElemOffset={})}},{key:"createVideoEle",value:function(){var e=this,i='<div class="video-feeds-container" id="videoFeedsContainer"></div>';_commonWidgetLibGmuZeptoZeptoJs2["default"]("#videoFeedsContainer").length||_commonWidgetLibGmuZeptoZeptoJs2["default"]("body").append(i),this.videoAd=new _articleNWidgetV2017VideoFeedsVideoAdEs2["default"],this.expVideoPlayer=new _commonWidgetExpVideoPlayerExpVideoPlayerEs2["default"]("videoFeedsContainer",{hasLogo:!0}),this.playerContainer=_commonWidgetLibGmuZeptoZeptoJs2["default"](".video-feeds-container"),this.player=this.expVideoPlayer.video();var t=_commonWidgetLibGmuZeptoZeptoJs2["default"](".video-main-container");this.feedQuery=t.attr("feed-q"),this.expVideoPlayer.container.on("fullscreenchange webkitfullscreenchange",function(){e.isFullScreen=!e.isFullScreen}),this.player.addEventListener("webkitbeginfullscreen",function(){e.isFullScreen=!0}),this.player.addEventListener("webkitendfullscreen",function(){e.isFullScreen=!1})}},{key:"scrollHandler",value:function(){if("none"!==_commonWidgetLibGmuZeptoZeptoJs2["default"]("#videoFeedsWrapper").css("display")){var e=this,i=window.scrollY,t=window.innerHeight,o=this.triggerDom.find(".J-video"),d=o.length;if(o.each(function(o,r){var n=_commonWidgetLibGmuZeptoZeptoJs2["default"](r).offset().top+1,a=n+t-1;if(i+t>n&&a>=i+t){if(e.scrollShowMap[o])return;var s=_commonWidgetLibGmuZeptoZeptoJs2["default"](r).attr("is-ad");"1"!==s&&nslog(location.href,2021,{module:"article-n",page:"index",pos:"video-feeds",action:"video-feeds-item-show",encEid:this.feedEid,intention:"video-feeds-log",feedVideoGroup:this.feedGroup,feedVideoExpGroup:F.context("feedVideoExpGroup"),firstOpen:firstOpen[e.triggerFrom],seedVid:e.seedVid,feedsVid:_commonWidgetLibGmuZeptoZeptoJs2["default"](r).attr("vid"),alreadyShow:e.alreadyShowMap[o]||0,videoIndex:_commonWidgetLibGmuZeptoZeptoJs2["default"](r).attr("video-feeds-num"),triggerFrom:e.triggerFrom,isFirstShow:!e.alreadyShowMap[o],videoProducer:"jingyan"}),o===d-1&&nslog(location.href,2021,{module:"article-n",page:"index",pos:"video-feeds",action:"video-last-item-show",encEid:this.feedEid,intention:"video-feeds-log",feedVideoGroup:this.feedGroup,feedVideoExpGroup:F.context("feedVideoExpGroup"),firstOpen:firstOpen[e.triggerFrom],seedVid:e.seedVid,feedsVid:_commonWidgetLibGmuZeptoZeptoJs2["default"](r).attr("vid"),alreadyShow:e.alreadyShowMap[o]||0,videoIndex:_commonWidgetLibGmuZeptoZeptoJs2["default"](r).attr("video-feeds-num"),triggerFrom:e.triggerFrom,videoProducer:"jingyan"}),e.scrollShowMap[o]=!0,e.alreadyShowMap[o]=1}else e.scrollShowMap[o]=!1}),_commonWidgetLibGmuZeptoZeptoJs2["default"]("."+this.playingVideoClassName).length>0){var r=document.documentElement.scrollTop||document.body.scrollTop,n=1/3,a=r>this.playingElemOffset.top-this.topNavBarHeight+this.playingElemOffset.height*n,s=r+globalConst.screenHeight<this.playingElemOffset.top+this.topNavBarHeight+this.playingElemOffset.height*(1-n);this.isTop=0===r?!0:!1;var l=this.getCurIndex();if(this.isTop&&0===l)return;if(a||s||this.isTop){this.stopVideo();var f=1;s&&(f=-1),this.playByScroll(l,f)}}this.feedHasMore&&!this.dataLoading&&i+t>this.tips.offset().top-200&&this.getVideoFeedAsync()}}},{key:"getCanplayIndex",value:function(e,i){var t=e+i,o=this.videoList[t];if(o){o=_commonWidgetLibGmuZeptoZeptoJs2["default"](o);var d=o.find(".video-cover-container");if(d&&d[0]){var r=d.offset(),n=(document.documentElement.scrollTop||document.body.scrollTop)+40,a=window.innerHeight,s=n+a;return r&&r.top>n&&r.bottom<s?t:this.getCanplayIndex(t,i)}}return this.getCurIndex()}},{key:"playByScroll",value:function(e,i){this.stopVideo();var t=this.getCanplayIndex(e,i);this.playVideo(t),this.nslogAutoPlay({module:"article-n",page:"index",pos:"video-feeds",action:"auto-play",seedVid:this.seedVid,alreadyPlay:this.alreadyPlayMap[t]||0,encEid:this.feedEid,feedsVid:this.feedsVid,intention:"video-feeds-log",feedVideoGroup:this.feedGroup,feedVideoExpGroup:F.context("feedVideoExpGroup"),firstOpen:firstOpen[this.triggerFrom],videoIndex:this.videoList.eq(t).attr("video-feeds-num"),triggerFrom:this.triggerFrom})}},{key:"playByScrollShouBaiCase",value:function(){var e=this,i=window.scrollY,t=window.innerHeight,o=[];0===i&&(e.playVideo(0),this.nslogAutoPlay({module:"article-n",page:"index",pos:"video-feeds",action:"auto-play",seedVid:e.seedVid,alreadyPlay:e.alreadyPlayMap[0]||0,encEid:this.feedEid,feedsVid:e.feedsVid,intention:"video-feeds-log",feedVideoGroup:this.feedGroup,feedVideoExpGroup:F.context("feedVideoExpGroup"),firstOpen:firstOpen[e.triggerFrom],videoIndex:0,triggerFrom:e.triggerFrom})),this.triggerDom.find(".J-video").each(function(d,r){var n=_commonWidgetLibGmuZeptoZeptoJs2["default"](r).offset().top;i>=n-t&&i<=n-e.topNavBarHeight&&(o.push(d),e.playVideo(o[0]),e.nslogAutoPlay({module:"article-n",page:"index",pos:"video-feeds",action:"auto-play",seedVid:e.seedVid,alreadyPlay:e.alreadyPlayMap[o[0]]||0,encEid:this.feedEid,feedsVid:e.feedsVid,intention:"video-feeds-log",feedVideoGroup:this.feedGroup,feedVideoExpGroup:F.context("feedVideoExpGroup"),firstOpen:firstOpen[e.triggerFrom],videoIndex:e.videoList.eq(o[0]).attr("video-feeds-num"),triggerFrom:e.triggerFrom}))})}},{key:"stopVideo",value:function(e){e||this.removePlayingSign(_commonWidgetLibGmuZeptoZeptoJs2["default"]("."+this.playingVideoClassName)),this.playerContainer.css({top:-9999});var i=this.getCurIndex(),t=this.player.currentTime,o=this.duration;this.stopTime=t;var d=(new Date).getTime()-this.playTime,r={module:"article-n",page:"index",pos:"video-feeds",seedVid:this.seedVid,alreadyPlay:this.alreadyPlayMap[i]||0,encEid:this.feedEid,feedsVid:this.feedsVid,intention:"video-feeds-log",feedVideoGroup:this.feedGroup,feedVideoExpGroup:F.context("feedVideoExpGroup"),firstOpen:firstOpen[this.triggerFrom],videoDuration:o,videoProducer:"jingyan",videoIndex:this.videoList.eq(i).attr("video-feeds-num"),triggerFrom:this.triggerFrom};this.player&&!this.player.paused&&(this.player.pause(),this.validDuration=this.validDuration+d,nslog(location.href,2021,Object.assign({action:"video-stop",stopTime:t,playDuration:d/1e3},r))),validFlag&&this.validDuration/1e3>=3&&nslog(location.href,2021,Object.assign({action:"valid-play"},r)),validFlag=!1,this.validDuration=0}},{key:"goBackHandler",value:function(){var e=this;_commonWidgetLibGmuZeptoZeptoJs2["default"]("#goBackExp").off("click").on("click",function(i){i.preventDefault(),firstOpen[e.triggerFrom]=0,e.hide(),nslog(location.href,2021,{module:"article-n",page:"index",pos:"video-feeds",action:"page-return",encEid:e.feedEid,intention:"video-feeds-log",feedVideoGroup:e.feedGroup,feedVideoExpGroup:F.context("feedVideoExpGroup"),firstOpen:firstOpen[e.triggerFrom],feedsVid:e.feedsVid,triggerFrom:e.triggerFrom})})}},{key:"setFeedsTrigger",value:function(){this.triggerDom=_commonWidgetLibGmuZeptoZeptoJs2["default"]("feeds-1"===this.triggerFrom?".from-rel-exp-1":"feeds-2"===this.triggerFrom?".from-rel-exp-2":".from-exp-cover"),this.feedsVid=this.seedVid=this.triggerDom.find(".video-0").attr("vid"),F.context("feedVideoGroup",this.triggerDom.attr("feed-group"))}},{key:"scrollTo",value:function(e,i){{var t=document.documentElement.scrollTop||document.body.scrollTop,o=e-t;animation({duration:300,delay:300,easing:"easeOutQuad",onStep:function(e){document.body.scrollTop=t+o*e,document.documentElement.scrollTop=t+o*e},onComplete:function(){"function"==typeof i&&i()}})}}},{key:"initLog",value:function(){var e=this.videoList.eq(0),i=+e.attr("video-duration");nslog(location.href,2021,{module:"article-n",page:"index",pos:"video-feeds",action:"page-show",gifCover:F.context("gifCover")||0,alreadyGif:F.context("alreadyGif")||0,seedVid:this.seedVid,encEid:this.feedEid,intention:"video-feeds-log",feedVideoGroup:this.feedGroup,feedVideoExpGroup:F.context("feedVideoExpGroup"),firstOpen:firstOpen[this.triggerFrom],feedsVid:this.feedsVid,triggerFrom:this.triggerFrom,videoProducer:"jingyan"}),nslog(location.href,2021,{module:"article-n",page:"index",pos:"video-feeds",action:"auto-play",seedVid:this.seedVid,alreadyPlay:0,videoIndex:0,encEid:this.feedEid,intention:"video-feeds-log",feedVideoGroup:this.feedGroup,feedVideoExpGroup:F.context("feedVideoExpGroup"),firstOpen:firstOpen[this.triggerFrom],feedsVid:this.feedsVid,triggerFrom:this.triggerFrom,videoDuration:i,videoProducer:"jingyan"})}},{key:"nslogAutoPlay",value:function(e){var i=this.getCurIndex(),t=this.videoList.eq(i),o=t.attr("is-ad"),d=+t.attr("video-duration");"1"!==o&&(e.videoDuration=d,e.videoProducer="jingyan",nslog(location.href,2021,e))}},{key:"historyHandler",value:function(){var e=this,i=location.href,t=void 0,o=void 0,d=void 0;"feeds-1"===this.triggerFrom||"feeds-2"===this.triggerFrom?(t=i+"#relpop",o="rel-exp"):(t=i,o="exp-cover"),window.history.replaceState({page:"orig",popType:o},document.title,i),window.history.pushState({page:"pop"},document.title,t),window.onpopstate=function(i){e.hide(),e.videoFbDialog&&e.videoFbDialog.closeDialog(),d=i.state},window.onhashchange=function(){d&&"orig"===d.page&&"rel-exp"===d.popType&&(document.body.scrollTop=document.documentElement.scrollTop=_commonWidgetLibGmuZeptoZeptoJs2["default"](".wgt-rel-exp").offset().top)}}},{key:"feedbackHandler",value:function(){var e=this;_commonWidgetLibGmuZeptoZeptoJs2["default"](".video-list").off("click",".video-feedback-section").on("click",".video-feedback-section",function(i){var t=_commonWidgetLibGmuZeptoZeptoJs2["default"](i.target).parents(".video-item").attr("vid");e.stopVideo(!0),e.videoFbDialog=new _articleNWidgetV2017VideoFeedsFeedbackFeedbackEs2["default"]({eid:e.feedEid,seedVid:e.seedVid,feedVid:t,triggerFrom:e.triggerFrom}),nslog(location.href,2021,{module:"article-n",page:"index",pos:"video-feedback-button",action:"click",encEid:e.feedEid,seedVid:e.seedVid,feedsVid:t,intention:"video-feeds-log",feedVideoGroup:e.feedGroup,feedVideoExpGroup:F.context("feedVideoExpGroup"),triggerFrom:e.triggerFrom})})}},{key:"formatDuration",value:function(e){var i=60;return Math.floor(e/i)+":"+e%i}},{key:"formatViewCount",value:function(e){return e>9999?Math.floor(e/1e4)+"万+":e.toString()}},{key:"getVideoFeedAsync",value:function(){var e=this;(this.feedHasMore||!this.dataLoading)&&(this.dataLoading=!0,this.tips.html("加载中..."),_commonWidgetLibGmuZeptoZeptoJs2["default"].ajax({url:"/article/ajax/videofeed",dataType:"json",data:{eid:this.feedEid,group:this.feedGroup,offset:this.feedOffset},success:function(i){e.dataLoading=!1,0===i.errno?!function(){var t=e.videoList.length,o=i.data;e.feedOffset=o.offset+o.limit,e.feedTotal=o.total,e.feedOffset>=o.total&&(e.feedHasMore=!1,e.tips.html("已到达页面尾部~"));var d=o.list.filter(function(i){var t=i.feedVid,o=!e.videoFeedVidSet.has(t);return o&&e.videoFeedVidSet.add(t),o}).map(function(i,o){var d=t+o;return _extends({},i,{itemIndex:d,viewCountStr:e.formatViewCount(i.videoView),durationStr:e.formatDuration(i.duration)})});d.length&&(e.feedList=e.feedList.concat(d),e.feedListWrapper.append(feedItemTmpl({list:d,isFeedGroupA:"A"===e.feedGroup})),setTimeout(function(){e.videoList=e.triggerDom.find(".J-video"),e.videoListLen=e.videoList.length},50))}():506===i.errno||702===i.errno?(e.feedHasMore=!1,e.tips.html("已到达页面尾部~")):e.tips.html("加载失败")},error:function(){e.dataLoading=!1,e.tips.html("加载失败")}}))}},{key:"processInitVideoFeedListData",value:function(e){var i=this;e.forEach(function(e){i.videoFeedVidSet.add(e.feedVid)}),e.length<9&&(this.feedHasMore=!1,this.tips.html("已到达页面尾部~"))}}]),e}();exports.VideoFeeds=VideoFeeds});
;define('article-n:widget/v2017/exp-head/exp-izhishi-video/exp-izhishi-video.js', function(require, exports, module){ /**
 * @file 视频播放js
 * @author
 * @date
 */

var $ = require('common:widget/lib/gmu/zepto/zepto.js');
var nslog = require('common:widget/ui/nslog/nslog.js');

var socialShare = require('common:widget/js/share/share.es');
// var BusinessShowcase = require('article-n:widget/v2017/exp-head/exp-izhishi-video/exp-izhishi-video-showcase.es').BusinessShowcase;

var VideoFeeds = require('article-n:widget/v2017/video-feeds/video-feeds.es').VideoFeeds;

var likeOrNotSend = require('article-n:widget/v2017/js/ui/like-dislike-act/like-dislike-act.js');
var ec = require('common:widget/js/util/event/event.es').event;
var tp = require('common:widget/js/util/template/template.es');
var ajax = require('common:widget/js/util/ajax/ajax.es').ajax;
var nslogIzhishi = require('article-n:widget/v2017/js/logic/nslog-izhishi/nslog-izhishi.es');
var videoExpSend = require('article-n:widget/v2017/js/logic/nslog-exp/nslog-exp.es').videoExpSend;
var ExpVideoPlayer = require('common:widget/exp-video-player/exp-video-player.es');
var getUaInfo = require('article-n:widget/v2017/js/util/util.es').getUaInfo;

var tpl = function render(data) {
        'use strict';
        var keyArr = [], valArr = [];
        data = data || {};
        data.__encodeHTML__ = window['template'].__encodeHTML;
        for(var key in data) {
            keyArr.push('"' + key + '"');
            valArr.push(data[key]);
        }
        var source = 'new Function(' + keyArr.join(',') + ', "\\"use strict\\";var __code__ = \\"\\";;__code__ += (\\"<video controls autoplay webkit-playsinline playsinline>     <source src=\\\\\\\"\\");__code__ += (__encodeHTML__(typeof (playUrl) === \\"undefined\\" ? \\"\\" : playUrl));__code__ += (\\"\\\\\\\" type=\\\\\\\"video/mp4\\\\\\\">     <p>         你的浏览器不支持视频播放，请下载播放，<a href=\\\\\\\"\\");__code__ += (__encodeHTML__(typeof (playUrl) === \\"undefined\\" ? \\"\\" : playUrl));__code__ += (\\"\\\\\\\">点击下载</a>。     </p> </video> \\");return __code__")';
        try {
            var fn = eval(source);
            var html = fn.apply(null, valArr);
        } catch (e) {
            e.name = 'RenderError';
            e.tpl = 'article-n:widget/v2017/exp-head/exp-izhishi-video/exp-izhishi-video.tmpl';
            window['template'].__handelError(e);
            return 'template.js error';
        }
        
        return html;
    };
var videoAdTpl = function render(data) {
        'use strict';
        var keyArr = [], valArr = [];
        data = data || {};
        data.__encodeHTML__ = window['template'].__encodeHTML;
        for(var key in data) {
            keyArr.push('"' + key + '"');
            valArr.push(data[key]);
        }
        var source = 'new Function(' + keyArr.join(',') + ', "\\"use strict\\";var __code__ = \\"\\";;__code__ += (\\"<div class=\\\\\\\"\\");__code__ += (__encodeHTML__(typeof (adClass) === \\"undefined\\" ? \\"\\" : adClass));__code__ += (\\" bounceInRight animated\\\\\\\" id=\\\\\\\"videoAd\\\\\\\">     <div class=\\\\\\\"\\");__code__ += (__encodeHTML__(typeof (adClass) === \\"undefined\\" ? \\"\\" : adClass));__code__ += (\\"-close\\\\\\\"></div> </div>\\");return __code__")';
        try {
            var fn = eval(source);
            var html = fn.apply(null, valArr);
        } catch (e) {
            e.name = 'RenderError';
            e.tpl = 'article-n:widget/v2017/exp-head/exp-izhishi-video/video-izhishi-ad.tmpl';
            window['template'].__handelError(e);
            return 'template.js error';
        }
        
        return html;
    };

var maxPlayedPercent = 0;
var logArray = [false, false, false, false, false]; // 打点位置，25,50,75,80,100%
// 来源 search(大搜) others（其他）
var source = /https?:\/\/(?:m|m5|www)\.baidu\.com/.test(document.referrer) ? 'search' : 'others';
var validTime = 3;
var validFlag = false;
var playTime = 0; // 当前播放时刻
var stopTime = 0; // 当前停止时刻
var playStartTime = 0; // 视频播放开始时间（时间戳）
var validDuration = 0; // 有效播放时长（累加值）
var uaInfo = getUaInfo(); // 获取端信息
var openType = uaInfo.isBaiduBox ? 'baiduboxapp' : 'wise'; // 区分端

function stop() {
    var playerCon = $('.wgt-exp-video .exp-video-player');
    if (playerCon.length) {
        playerCon.find('video')[0].pause();
        setTimeout(function () {
            playerCon.remove();
        }, 10);
    }
    $('.wgt-exp-video .video-img').show();
}
var videoInteractFooter = $('.interact-footer');
var handleVideoInteractFooterOnce = false;
function handleVideoInteractFooter() {
    if (handleVideoInteractFooterOnce) {
        return;
    }
    handleVideoInteractFooterOnce = true;
    // 出现动画
    videoInteractFooter.css({
        // borderBottom: '1px solid #EEEEEE',
        height: '42px'
    });
    setTimeout(function () {
        videoInteractFooter.css({
            borderBottom: '1px solid #EEEEEE'
        });
    }, 1000);
    videoInteractFooter.find('span').css('opacity', '1');

    $('.exp-title').css('marginTop', '42px');
    if (F.context('ShowFeedExp')) {
        $('.abstract-wp').css('paddingTop', '42px');
    }

    videoInteractFooter.find('#video-like').on('click', function (e) {
        if ($(this).hasClass('like-icon-already')) {
            // 这里设置 z-index 的原因是，窄屏幕手机会挡住 #video-like
            $('.info-tooltip').css('z-index', 1000).html('您已赞过').fadeIn();
            setTimeout(function () {
                $('.info-tooltip').fadeOut().css('z-index', -90);
            }, 2000);
            return;
        }
        var me = this;
        var params = {
            method: 'feedback',
            eidEnc: F.context('eidEnc'),
            BdStoken: F.context('BdsToken'),
            bdstt: F.context('bdstt'),
            type: 1
        };
        var videolikeEle = videoInteractFooter.find('#video-like');
        // 判断是否登录
        ajax({
            type: 'POST',
            url: '/common/isLogin/?_t=' + (+new Date),
            dataType: 'json'
        }).then(function (ret) {
            if (ret.errno === 0) {
                // 真实提交
                likeOrNotSend.likeOrNotSubmit(params, function () {
                    // console.log('fail');
                });
                return;
            }
            var pathname = location.href.indexOf('?') > -1 ? '&' : '?';
            var url = location.href + pathname;
            location.href = 'https://wappass.baidu.com/passport/?u=' + encodeURIComponent(url) + '&tpl=exp';
        });
        nslog(location.href, 2021, {
            module: 'article-n',
            page: 'index',
            pos: 'video-bottom-like',
            action: 'click',
            likeType: 1,
            eidEnc: F.context('eidEnc'),
            videoShowCase: +F.context('videoShowCase'),
            strongCorrelation: F.context('strongCorrelation'),
            wapDetailTest: F.context('wapDetailTest'),
            newVersion: F.context('newVersion'),
            recommendVideoData: F.context('recommendVideoData')
        });
    });

    videoInteractFooter.find('.share-icon-gray').on('click', function (e) {
        // 分享
        var shareInfo = {
            title: $('title').text(),
            summary: '解决你所有的生活难题',
            pic: 'https://jingyan.baidu.com/event/img/jingyan-fx.jpg',
            log: {
                page: 'article-n-v2017'
            }
        };
        socialShare.share(shareInfo);
        nslog(location.href, 2021, {
            module: 'article-n',
            page: 'index',
            pos: 'video-bottom-share',
            action: 'click',
            eidEnc: F.context('eidEnc'),
            videoShowCase: +F.context('videoShowCase'),
            strongCorrelation: F.context('strongCorrelation'),
            wapDetailTest: F.context('wapDetailTest'),
            newVersion: F.context('newVersion'),
            recommendVideoData: F.context('recommendVideoData')
        });
    });
}
function likeChangeHandler() {
    // 响应 like-status-change 事件
    ec.on('like-status-change', function () {
        var likeEle = videoInteractFooter.find('#video-like');
        if (+F.context('likeStatus') === 1) {
            // 成功点赞
            likeEle.removeClass('like-icon-black ').addClass('like-icon-already');
            videoInteractFooter.find('.interact-like-num').html(likeOrNotSend.formatNum(+F.context('likeNum')));
        }
        else if (+F.context('likeStatus') === 2) {
            // 成功点踩，此处没有踩 icon，但是赞数要 -1
            likeEle.removeClass('like-icon-already').addClass('like-icon-black');
            videoInteractFooter.find('.interact-like-num').html(likeOrNotSend.formatNum(+F.context('likeNum')));
        }
    });
}
function init(playUrl, encVid, eidEnc, videoShowCase, videoDuration, coverImage, videoFeedList) {
    var $wp = $('.wgt-exp-video');
    var strongCorrelation = F.context('strongCorrelation'); // 强关联
    var playFlag = false; // 播放标识
    var tailFlag = false; // 播放完成标识
    var tailTime = videoDuration * .8; // 播放完成点
    var videoCoverClkFlag = false;

    nslogIzhishi(location.href, 2021, {
        name: 'VIDEO_SHOW',
        act: 'view',
        videoId: encVid,
        eidEnc: eidEnc
    });
    // 首次 真实曝光打点
    nslog(location.href, 2021, {
        module: 'article-n',
        page: 'index',
        pos: 'header-video',
        action: 'show',
        videoType: 2,
        videoShowCase: +videoShowCase,
        source: source,
        openType: openType,
        videoProducer: 'jingyan',
        gifCover: F.context('gifCover') || 0,
        strongCorrelation: strongCorrelation,
        wapDetailTest: F.context('wapDetailTest'),
        newVersion: F.context('newVersion'),
        recommendVideoData: F.context('recommendVideoData'),
        isFirstShow: true,
        encVid: encVid,
        eidEnc: eidEnc
    });
    // 2018打点收敛
    videoExpSend({
        action: 'show'
    });
    // 监听赞踩事件
    likeChangeHandler();

    // 商业化 showcase
    // var businessShowcase = new BusinessShowcase(encVid, eidEnc, videoDuration, coverImage);
    var muted = true;
    var supportAutoPlay = false;

    $wp.on('click', '.video-img, .video-img-cover, .video-ssc-mask', function (e, data) {
        var me = this;
        nslog(location.href, 2021, {
            module: 'article-n',
            page: 'index',
            pos: 'video-img',
            videoType: 2,
            action: 'click',
            eidEnc: eidEnc,
            videoShowCase: +videoShowCase,
            encVid: encVid,
            gifCover: F.context('gifCover') || 0,
            strongCorrelation: strongCorrelation,
            wapDetailTest: F.context('wapDetailTest'),
            newVersion: F.context('newVersion'),
            recommendVideoData: F.context('recommendVideoData'),
            showVideoFeeds: F.context('showVideoFeeds')
        });

        var showVideoFeeds = F.context('showVideoFeeds');
        // 进入视频流弹层
        if (+showVideoFeeds) {
            var videoFeeds = new VideoFeeds({
                from: 'exp-cover',
                feedList: videoFeedList
            });
            return;
        }

        // $(this).hide();
        var expVideoPlayer = new ExpVideoPlayer('exp-video-player-container', {src: playUrl, autoplay: true});
        // $(this).after(tpl({playUrl: playUrl}));

        // var playPromise = $('video', $wp)[0].play();
        // if (playPromise !== undefined) {
        //     playPromise.then(function () {
        //         $(me).hide();
        //         // 显示视频下方用户交互组件（赞、分享）
        //         handleVideoInteractFooter();
        //         F.context('autoPlay', '1');
        //         supportAutoPlay = true;
        //         // 支持自动播放时，触碰到视频就要把静音去掉
        //         $('video', $wp).on('touchstart', function () {
        //             $('video', $wp)[0].muted = false;
        //         });
        //         if (!playFlag) {
        //             playLog();
        //             playFlag = true;
        //         }
        //     }).catch(function () {
        //         $(me).show();
        //         $('video', $wp).remove();
        //         F.context('autoPlay', '0');
        //         supportAutoPlay = false;
        //         // 不支持自动播放时，开始播放就要把静音去掉
        //         ec.on('exp-video/play', function (data) {
        //             if (supportAutoPlay === false) {
        //                 $('video', $wp)[0].muted = false;
        //                 muted = false;
        //             }
        //         });
        //         if (!playFlag) {
        //             playLog();
        //             playFlag = true;
        //         }
        //     });
        // }
        // else if (data && data.autoPlay) {
        //     $(me).show();
        //     $('video', $wp).remove();
        //     F.context('autoPlay', '0');
        //     if (!playFlag) {
        //         playLog();
        //         playFlag = true;
        //     }
        //     return;
        // }
        handleVideoInteractFooter();

        $('video', $wp)[0].addEventListener('play', function () {
            ec.emit('exp-video/play');
        });

        var closeAd1 = false;
        var closeAd2 = false;
        var videoVV = false;
        $('video', $wp)[0].addEventListener('timeupdate', function () {
            // 视频播放vv, 区分支持自动播放和不支持
            if (!videoVV) {
                nslog(location.href, 2021, {
                    module: 'article-n',
                    page: 'index',
                    pos: 'index-video',
                    action: 'play',
                    autoPlay: F.context('autoPlay'),
                    recommendVideoData: F.context('recommendVideoData')
                });
                izhishiPlayLog();
                videoVV = true;
            }
            var currentTime = $('video', $wp)[0].currentTime;
            if (currentTime >= validTime && !validFlag) {
                validFlag = true;
            }
            if (+videoShowCase === 1) {
                if (currentTime > 10 && currentTime < 25) {
                    if (+$('#videoAd').length || closeAd1) {
                        return 1;
                    }
                    $wp.append(videoAdTpl({adClass: 'ad-banli1'}));
                    // 第一个浮层广告展现次数
                    nslog(location.href, 2021, {
                        module: 'article-n',
                        page: 'index',
                        pos: 'video-ad1-show',
                        action: 'show',
                        strongCorrelation: strongCorrelation,
                        recommendVideoData: F.context('recommendVideoData')
                    });

                    $('.ad-banli1-close').on('click', function (e) {
                        closeAd1 = true;
                        e.stopPropagation();
                        $('#videoAd').remove();
                        // 第一个浮层广告点击关闭次数
                        nslog(location.href, 2021, {
                            module: 'article-n',
                            page: 'index',
                            pos: 'video-ad1-click-close',
                            action: 'click',
                            strongCorrelation: strongCorrelation,
                            recommendVideoData: F.context('recommendVideoData')
                        });
                    });
                    $('.ad-banli1').on('click', function (e) {
                        window.open('https://so.m.jd.com/ware/search.action?keyword=%E6%9D%BF%E6%A0%97');
                        // 第一个浮层广告点击次数
                        nslog(location.href, 2021, {
                            module: 'article-n',
                            page: 'index',
                            pos: 'video-ad1-click',
                            action: 'click',
                            strongCorrelation: strongCorrelation,
                            recommendVideoData: F.context('recommendVideoData')
                        });
                    });
                }
                if (currentTime > 25 && currentTime < 35) {
                    if (+$('#videoAd').length) {
                        $('#videoAd').remove();
                    }
                }
                if (currentTime > 35 && currentTime < 50) {
                    if (+$('#videoAd').length || closeAd2) {
                        return 1;
                    }
                    $wp.append(videoAdTpl({adClass: 'ad-banli2'}));
                    // 第二个浮层广告展现次数
                    nslog(location.href, 2021, {
                        module: 'article-n',
                        page: 'index',
                        pos: 'video-ad2-show',
                        action: 'show',
                        strongCorrelation: strongCorrelation,
                        recommendVideoData: F.context('recommendVideoData')
                    });

                    $('.ad-banli2-close').on('click', function (e) {
                        closeAd2 = true;
                        e.stopPropagation();
                        $('#videoAd').remove();
                        // 第二个浮层广告点击关闭次数
                        nslog(location.href, 2021, {
                            module: 'article-n',
                            page: 'index',
                            pos: 'video-ad2-click-close',
                            action: 'click',
                            strongCorrelation: strongCorrelation,
                            recommendVideoData: F.context('recommendVideoData')
                        });
                    });
                    $('.ad-banli2').on('click', function (e) {
                        window.open('https://so.m.jd.com/ware/search.action?keyword=%E6%A0%97%E4%BB%81');
                        // 第二个浮层广告点击次数
                        nslog(location.href, 2021, {
                            module: 'article-n',
                            page: 'index',
                            pos: 'video-ad2-click',
                            action: 'click',
                            strongCorrelation: strongCorrelation,
                            recommendVideoData: F.context('recommendVideoData')
                        });
                    });
                }
                if (currentTime > 50) {
                    if (+$('#videoAd').length) {
                        $('#videoAd').remove();
                    }
                }
            }

            var currentPercent = Math.floor(currentTime / videoDuration * 100);
            if (currentPercent > maxPlayedPercent) {
                maxPlayedPercent = currentPercent;
            }
            logPlayedPercent(currentPercent, logArray, encVid, eidEnc);
            // 2018新规则，多次播放多次打点
            if (currentTime >= tailTime) {
                if (!tailFlag && playFlag) {
                    tailFlag = true; // 片尾标记
                    // 2018打点收敛
                    videoExpSend({
                        action: 'done'
                    });
                }
                playFlag = false;
            }
            else {
                tailFlag = false;
                // 多次播放打点
                if (!playFlag) {
                    playLog();
                    playFlag = true;
                }
            }
        });

        $('video', $wp)[0].addEventListener('pause', function () {
            var currentPercent = Math.floor($('video', $wp)[0].currentTime / videoDuration * 100);
            if (currentPercent >= maxPlayedPercent) {
                maxPlayedPercent = currentPercent;
                nslogPlayPercent(currentPercent, encVid, eidEnc);
            }
        });
        $('video', $wp)[0].addEventListener('ended', function () {
            if (tailFlag) {
                // 2018打点收敛
                videoExpSend({
                    action: 'over'
                });
            }
            tailFlag = false; // 清空标识位
            playFlag = false;

            if (logArray[4]) {
                return;
            }
            logArray[0] = logArray[1] = logArray[2] = logArray[3] = logArray[4] = true;
            maxPlayedPercent = 100;
            nslogPlayPercent(100, encVid, eidEnc);

            if (validFlag && (validDuration / 1000) >= validTime) {
                nslog(location.href, 2021, {
                    module: 'article-n',
                    page: 'index',
                    pos: 'header-video',
                    action: 'valid-play',
                    eidEnc: eidEnc,
                    encVid: encVid,
                    videoProducer: 'jingyan',
                    videoShowCase: +videoShowCase,
                    strongCorrelation: strongCorrelation,
                    wapDetailTest: F.context('wapDetailTest'),
                    newVersion: F.context('newVersion'),
                    recommendVideoData: F.context('recommendVideoData'),
                    supportAutoPlay: supportAutoPlay ? 1 : 0
                });
                // console.log('有效播放次数打点, validDuration: ', validDuration / 1000);
            }
            validFlag = false;

            nslog(location.href, 2021, {
                module: 'article-n',
                page: 'index',
                pos: 'header-video',
                action: 'ended',
                videoType: 2,
                eidEnc: eidEnc,
                encVid: encVid,
                videoShowCase: +videoShowCase,
                strongCorrelation: strongCorrelation,
                wapDetailTest: F.context('wapDetailTest'),
                newVersion: F.context('newVersion'),
                recommendVideoData: F.context('recommendVideoData')
            });
        });
        // 视频打点
        videoLog2020(videoDuration, encVid, eidEnc);

        if (!playFlag) {
            playLog();
            playFlag = true;
        }

        // 点击封面图，只统计第一次点击
        if (!videoCoverClkFlag) {
            videoExpSend({
                pos: 'video-cover-izhishi',
                action: 'click'
            });
            videoCoverClkFlag = true;
        }

        ec.emit('exp-video/play');

        ec.on('douwan-video/play', function () {
            stop();
        });
        ec.on('feed-video/play', function () {
            stop();
        });
        $(window).on('unload', function () {
            var currentPercent = Math.floor($('video', $wp)[0].currentTime / videoDuration * 100);
            if (currentPercent >= maxPlayedPercent) {
                maxPlayedPercent = currentPercent;
                nslogPlayPercent(currentPercent, encVid, eidEnc);
            }
        });
    });
}
function izhishiPlayLog() {
    $.ajax({
        url: '/submit/izhishidatapoint?method=addIzhishiPlayPoint',
        type: 'post',
        data: {
            izhishiVid: F.context('encVid')
        }
    });
    nslogIzhishi(location.href, 2021, {
        name: 'VIDEO_PLAY',
        act: 'clk',
        videoId: F.context('encVid'),
        autoPlay: F.context('autoPlay') || 0,
        eidEnc: F.context('encEid')
    });
}
// 视频播放次数(vv) + 播放时长 打点
function videoLog2020(videoDuration, encVid, eidEnc) {
    var player = $('video', $('.wgt-exp-video'))[0];
    var playVv = 0;
    player.addEventListener('play', function () {
        playTime = player.currentTime;
        playStartTime = new Date().getTime();
        // console.log('播放 ####')
        // console.log('playTime',playTime)

        // 视频开始播放即算VV；
        // 重新播放算一次新增VV；
        // 暂停后点击播放不算一次新增VV
        if (playTime === 0) {
            playVv = 1;
        } else {
            playVv = 0;
        }
        nslog(location.href, 2021, {
            page: 'index',
            pos: 'header-video',
            action: 'video-play',
            source: source,
            openType: openType,
            eidEnc: eidEnc,
            encVid: encVid,
            videoDuration: videoDuration,
            videoProducer: 'jingyan',
            playVv: playVv
        });
        ec.emit('exp-video/play');
    });

    player.addEventListener('error', function (e) {
        // console.log('视频播放次数(vv),播放失败');
        // 播放出错代码	打点
        nslog(location.href, 2021, {
            page: 'index',
            pos: 'header-video',
            action: 'play-err',
            source: source,
            openType: openType,
            eidEnc: eidEnc,
            encVid: encVid,
            videoProducer: 'jingyan',
            isAuto: F.context('autoPlay'),
            isSuccess: 0,
            errObj: JSON.stringify(e || {})
        });
    });
    player.addEventListener('pause',  () => {
        // let currentTime = player.currentTime;
        stopTime = player.currentTime;
        let playDuration = new Date().getTime() - playStartTime;
        validDuration = validDuration + playDuration;
        if ((stopTime - playTime) < 0) {
            return;
        }
        nslog(location.href, 2021, {
            module: 'article-n',
            page: 'index',
            pos: 'header-video',
            action: 'video-stop',
            eidEnc: eidEnc,
            encVid: encVid,
            stopTime: stopTime,
            playDuration: playDuration / 1000,
            videoDuration: videoDuration,
            source: source,
            openType: openType,
            videoProducer: 'jingyan'
        });
        // console.log('暂停 ####')
        // console.log('播放时长：',playDuration / 1000);
        // console.log('validDuration: ', validDuration / 1000);
    });
}
function playLog() {
    // izhishiPlayLog();
    // 2018打点收敛
    videoExpSend({
        action: 'play'
    });
}
function nslogPlayPercent (currentPercent, encVid, eidEnc) {
    nslogIzhishi(location.href, 2021, {
        name: 'VIDEO_PLAY_TIME',
        act: 'other',
        videoId: encVid,
        percentage: currentPercent,
        eidEnc: eidEnc
    });
}
// 播放时间>25、50、75、80%时打点
function logPlayedPercent(currentPercent, logArray, encVid, eidEnc) {
    if (currentPercent >= 25 && currentPercent < 50) {
        if (!logArray[0]) {
            logArray[0] = true;
            nslogPlayPercent(25, encVid, eidEnc);
        }
    } else if (currentPercent >= 50 && currentPercent < 75) {
        if (!logArray[1]) {
            logArray[1] = true;
            nslogPlayPercent(50, encVid, eidEnc);
        }
    } else if (currentPercent >= 75 && currentPercent < 80) {
        if (!logArray[2]) {
            logArray[2] = true;
            nslogPlayPercent(75, encVid, eidEnc);
        }
    } else if (currentPercent >= 80) {
        if (!logArray[3]) {
            logArray[3] = true;
            nslogPlayPercent(80, encVid, eidEnc);
            nslog(location.href, 2021, {
                module: 'article-n',
                page: 'index',
                pos: 'header-video',
                action: 'video-tail',
                videoType: 2,
                videoShowCase: +F.context('videoShowCase'),
                strongCorrelation: F.context('strongCorrelation'),
                wapDetailTest: F.context('wapDetailTest'),
                newVersion: F.context('newVersion'),
                recommendVideoData: F.context('recommendVideoData')
            });
        }
    }
}

exports.init = init;
 
});
;define("article-n:widget/v2017/exp-head/exp-video/exp-video-showcase.es",function(){"use strict"});
;define('article-n:widget/v2017/exp-head/exp-video/exp-video.js', function(require, exports, module){ /**
 * @file 视频播放js
 * @author
 * @date
 */

var $ = require('common:widget/lib/gmu/zepto/zepto.js');
var nslog = require('common:widget/ui/nslog/nslog.js');

var socialShare = require('common:widget/js/share/share.es');
// var BusinessShowcase = require('article-n:widget/v2017/exp-head/exp-video/exp-video-showcase.es').BusinessShowcase;

var VideoFeeds = require('article-n:widget/v2017/video-feeds/video-feeds.es').VideoFeeds;

var likeOrNotSend = require('article-n:widget/v2017/js/ui/like-dislike-act/like-dislike-act.js');
var ec = require('common:widget/js/util/event/event.es').event;
var tp = require('common:widget/js/util/template/template.es');
var ajax = require('common:widget/js/util/ajax/ajax.es').ajax;
var videoExpSend = require('article-n:widget/v2017/js/logic/nslog-exp/nslog-exp.es').videoExpSend;
var ExpVideoPlayer = require('common:widget/exp-video-player/exp-video-player.es');
var utils = require('article-n:widget/v2017/js/util/util.es');

var tpl = function render(data) {
        'use strict';
        var keyArr = [], valArr = [];
        data = data || {};
        data.__encodeHTML__ = window['template'].__encodeHTML;
        for(var key in data) {
            keyArr.push('"' + key + '"');
            valArr.push(data[key]);
        }
        var source = 'new Function(' + keyArr.join(',') + ', "\\"use strict\\";var __code__ = \\"\\";;__code__ += (\\"<video controls autoplay webkit-playsinline playsinline>     <source src=\\\\\\\"\\");__code__ += (__encodeHTML__(typeof (playUrl) === \\"undefined\\" ? \\"\\" : playUrl));__code__ += (\\"\\\\\\\" type=\\\\\\\"video/mp4\\\\\\\">     <p>         你的浏览器不支持视频播放，请下载播放，<a href=\\\\\\\"\\");__code__ += (__encodeHTML__(typeof (playUrl) === \\"undefined\\" ? \\"\\" : playUrl));__code__ += (\\"\\\\\\\">点击下载</a>。     </p> </video> \\");return __code__")';
        try {
            var fn = eval(source);
            var html = fn.apply(null, valArr);
        } catch (e) {
            e.name = 'RenderError';
            e.tpl = 'article-n:widget/v2017/exp-head/exp-video/exp-video.tmpl';
            window['template'].__handelError(e);
            return 'template.js error';
        }
        
        return html;
    };
var videoAdTpl = function render(data) {
        'use strict';
        var keyArr = [], valArr = [];
        data = data || {};
        data.__encodeHTML__ = window['template'].__encodeHTML;
        for(var key in data) {
            keyArr.push('"' + key + '"');
            valArr.push(data[key]);
        }
        var source = 'new Function(' + keyArr.join(',') + ', "\\"use strict\\";var __code__ = \\"\\";;__code__ += (\\"<div class=\\\\\\\"\\");__code__ += (__encodeHTML__(typeof (adClass) === \\"undefined\\" ? \\"\\" : adClass));__code__ += (\\" bounceInRight animated\\\\\\\" id=\\\\\\\"videoAd\\\\\\\">     <div class=\\\\\\\"\\");__code__ += (__encodeHTML__(typeof (adClass) === \\"undefined\\" ? \\"\\" : adClass));__code__ += (\\"-close\\\\\\\"></div> </div>\\");return __code__")';
        try {
            var fn = eval(source);
            var html = fn.apply(null, valArr);
        } catch (e) {
            e.name = 'RenderError';
            e.tpl = 'article-n:widget/v2017/exp-head/exp-video/video-ad.tmpl';
            window['template'].__handelError(e);
            return 'template.js error';
        }
        
        return html;
    };

var videoMuted = false;
var supportAutoPlay = utils.isChromeOrSafari();

var expVideoPlayer;
var $wp;
var validTime = 3;
var validFlag = false;
var tailTime; // 播放到片尾（80%）打一次点
var tailFlag = false; // 片尾区域标记
var playFlag = false; // 播放标识
var strongCorrelation = F.context('strongCorrelation'); // 强关联
var isFeedPlayExpCmp = F.context('feedPlayExpCmp'); // 是否是视频直接播放实验组
// 来源 search(大搜) others（其他）
var source = /https?:\/\/(?:m|m5|www)\.baidu\.com/.test(document.referrer) ? 'search' : 'others';
var playTime = 0; // 当前播放时刻
var stopTime = 0; // 当前停止时刻
var playStartTime = 0; // 视频播放开始时间（时间戳）
var validDuration = 0; // 有效播放时长（累加值）
var uaInfo = utils.getUaInfo();
var openType = uaInfo.isBaiduBox ? 'baiduboxapp' : 'wise'; // 区分端

function stop() {
    var playerCon = $('.wgt-exp-video .exp-video-player');
    if (playerCon.length) {
        playerCon.find('video')[0].pause();
        setTimeout(function () {
            playerCon.remove();
        }, 10);
    }
    $('.wgt-exp-video .video-img').show();
}
var videoInteractFooter = $('.interact-footer');
var handleVideoInteractFooterOnce = false;
var feedList = [];
function handleVideoInteractFooter() {
    if (handleVideoInteractFooterOnce) {
        return;
    }
    handleVideoInteractFooterOnce = true;
    // 出现动画
    videoInteractFooter.css({
        // borderBottom: '1px solid #EEEEEE',
        height: '42px'
    });
    setTimeout(function () {
        videoInteractFooter.css({
            borderBottom: '1px solid #EEEEEE'
        });
    }, 1000);
    videoInteractFooter.find('span').css('opacity', '1');

    $('.exp-title').css('marginTop', '42px');
    if (F.context('ShowFeedExp')) {
        $('.abstract-wp').css('paddingTop', '42px');
    }

    videoInteractFooter.find('#video-like').on('click', function (e) {
        if ($(this).hasClass('like-icon-already')) {
            // 这里设置 z-index 的原因是，窄屏幕手机会挡住 #video-like
            $('.info-tooltip').css('z-index', 1000).html('您已赞过').fadeIn();
            setTimeout(function () {
                $('.info-tooltip').fadeOut().css('z-index', -90);
            }, 2000);
            return;
        }
        var me = this;
        var params = {
            method: 'feedback',
            eidEnc: F.context('eidEnc'),
            BdStoken: F.context('BdsToken'),
            bdstt: F.context('bdstt'),
            type: 1
        };
        var videolikeEle = videoInteractFooter.find('#video-like');
        // 判断是否登录
        ajax({
            type: 'POST',
            url: '/common/isLogin/?_t=' + (+new Date),
            dataType: 'json'
        }).then(function (ret) {
            if (ret.errno === 0) {
                // 真实提交
                likeOrNotSend.likeOrNotSubmit(params, function () {
                    // console.log('fail');
                });
                return;
            }
            var pathname = location.href.indexOf('?') > -1 ? '&' : '?';
            var url = location.href + pathname;
            location.href = 'https://wappass.baidu.com/passport/?u=' + encodeURIComponent(url) + '&tpl=exp';
        });
        nslog(location.href, 2021, {
            module: 'article-n',
            page: 'index',
            pos: 'video-bottom-like',
            action: 'click',
            likeType: 1,
            eidEnc: F.context('eidEnc'),
            videoShowCase: +F.context('videoShowCase'),
            strongCorrelation: F.context('strongCorrelation'),
            wapDetailTest: F.context('wapDetailTest'),
            newVersion: F.context('newVersion'),
            recommendVideoData: F.context('recommendVideoData')
        });
    });

    videoInteractFooter.find('.share-icon-gray').on('click', function (e) {
        // 分享
        var shareInfo = {
            title: $('title').text(),
            summary: '解决你所有的生活难题',
            pic: 'https://jingyan.baidu.com/event/img/jingyan-fx.jpg',
            log: {
                page: 'article-n-v2017'
            }
        };
        socialShare.share(shareInfo);
        nslog(location.href, 2021, {
            module: 'article-n',
            page: 'index',
            pos: 'video-bottom-share',
            action: 'click',
            eidEnc: F.context('eidEnc'),
            videoShowCase: +F.context('videoShowCase'),
            strongCorrelation: F.context('strongCorrelation'),
            wapDetailTest: F.context('wapDetailTest'),
            newVersion: F.context('newVersion'),
            recommendVideoData: F.context('recommendVideoData')
        });
    });
}
function likeChangeHandler() {
    // 响应 like-status-change 事件
    ec.on('like-status-change', function () {
        var likeEle = videoInteractFooter.find('#video-like');
        if (+F.context('likeStatus') === 1) {
            // 成功点赞
            likeEle.removeClass('like-icon-black ').addClass('like-icon-already');
            videoInteractFooter.find('.interact-like-num').html(likeOrNotSend.formatNum(+F.context('likeNum')));
        }
        else if (+F.context('likeStatus') === 2) {
            // 成功点踩，此处没有踩 icon，但是赞数要 -1
            likeEle.removeClass('like-icon-already').addClass('like-icon-black');
            videoInteractFooter.find('.interact-like-num').html(likeOrNotSend.formatNum(+F.context('likeNum')));
        }
    });
}
function init(playUrl, encVid, eidEnc, videoShowCase, videoDuration, coverImage, videoFeedList) {
    $wp = $('.wgt-exp-video');
    tailTime = Math.floor(videoDuration * .8); // 播放到片尾（80%）打一次点
    tailFlag = false; // 片尾区域标记
    playFlag = false; // 播放标识
    strongCorrelation = F.context('strongCorrelation'); // 强关联
    feedList = videoFeedList;
    // 监听赞踩事件
    likeChangeHandler();

    // 商业化 showcase
    // var businessShowcase = new BusinessShowcase(encVid, eidEnc, videoDuration, coverImage);

    // 头部视频展现、曝光打点
    nslog(location.href, 2021, {
        module: 'article-n',
        page: 'index',
        pos: 'header-video',
        action: 'show',
        videoType: 1,
        videoShowCase: +videoShowCase,
        source: source,
        openType: openType,
        videoProducer: 'jingyan',
        strongCorrelation: strongCorrelation,
        wapDetailTest: F.context('wapDetailTest'),
        newVersion: F.context('newVersion'),
        recommendVideoData: F.context('recommendVideoData'),
        eidEnc: eidEnc,
        encVid: encVid,
        isFirstShow: true,
        supportAutoPlay: supportAutoPlay ? 1 : 0
    });
    // 2018打点收敛
    videoExpSend({
        action: 'show',
        supportAutoPlay: supportAutoPlay ? 1 : 0
    });

    if (isFeedPlayExpCmp && supportAutoPlay) {
        F.context('autoPlay', '1');
        videoMuted = true;
        videoAutoPlay(playUrl, encVid, eidEnc, videoShowCase, videoDuration, coverImage);
    } else {
        F.context('autoPlay', '0');
        videoMuted = false;
        userClickPlay(playUrl, encVid, eidEnc, videoShowCase, videoDuration, coverImage);
    }
}
function bizVideoLog(playUrl, encVid, eidEnc, videoShowCase, videoDuration, coverImage) {
    if (expVideoPlayer) {
        var player = expVideoPlayer.video();
        var closeAd1 = false;
        var closeAd2 = false;

        player.addEventListener('play', function () {
            var playVv = 0;
            playTime = player.currentTime;
            playStartTime = new Date().getTime();
            // console.log('播放 ####')
            // console.log('playTime',playTime)

            // 视频开始播放即算VV；
            // 重新播放算一次新增VV；
            // 暂停后点击播放不算一次新增VV
            if (playTime === 0) {
                playVv = 1;
            }
            nslog(location.href, 2021, {
                module: 'article-n',
                page: 'index',
                pos: 'header-video',
                action: 'video-play',
                playVv: playVv,
                source: source,
                openType: openType,
                eidEnc: eidEnc,
                encVid: encVid,
                videoDuration: videoDuration,
                videoProducer: 'jingyan',
                autoPlay: F.context('autoPlay'),
                recommendVideoData: F.context('recommendVideoData'),
                supportAutoPlay: supportAutoPlay ? 1 : 0
            });
            ec.emit('exp-video/play');
        });
        player.addEventListener('error', function (e) {
            // console.log('视频播放次数(vv),播放失败');
            // 播放出错代码	打点
            nslog(location.href, 2021, {
                page: 'index',
                pos: 'header-video',
                action: 'play-err',
                source: source,
                openType: openType,
                eidEnc: eidEnc,
                encVid: encVid,
                videoProducer: 'jingyan',
                isAuto: F.context('autoPlay'),
                isSuccess: 0,
                errObj: JSON.stringify(e || {})
            });
        });
        player.addEventListener('pause',  () => {
            stopTime = player.currentTime;
            let playDuration = new Date().getTime() - playStartTime;
            validDuration = validDuration + playDuration;
            if ((stopTime - playTime) < 0) {
                return;
            }

            nslog(location.href, 2021, {
                module: 'article-n',
                page: 'index',
                pos: 'header-video',
                action: 'video-stop',
                eidEnc: eidEnc,
                encVid: encVid,
                stopTime: stopTime,
                playDuration: playDuration / 1000,
                videoDuration: videoDuration,
                source: source,
                openType: openType,
                videoProducer: 'jingyan',
            });
            // console.log('暂停 ####')
            // console.log('播放时长：',playDuration)
        });
        player.addEventListener('timeupdate', function () {
            var currentTime = player.currentTime;
            if (currentTime >= validTime && !validFlag) {
                validFlag = true;
            }
            if (+videoShowCase === 1) {
                if (currentTime > 10 && currentTime < 25) {
                    if (+$('#videoAd').length || closeAd1) {
                        return 1;
                    }
                    $wp.append(videoAdTpl({adClass: 'ad-banli1'}));
                    // 第一个浮层广告展现次数
                    nslog(location.href, 2021, {
                        module: 'article-n',
                        page: 'index',
                        pos: 'video-ad1-show',
                        action: 'show',
                        strongCorrelation: strongCorrelation,
                        recommendVideoData: F.context('recommendVideoData')
                    });

                    $('.ad-banli1-close').on('click', function (e) {
                        closeAd1 = true;
                        e.stopPropagation();
                        $('#videoAd').remove();
                        // 第一个浮层广告点击关闭次数
                        nslog(location.href, 2021, {
                            module: 'article-n',
                            page: 'index',
                            pos: 'video-ad1-click-close',
                            action: 'click',
                            strongCorrelation: strongCorrelation,
                            recommendVideoData: F.context('recommendVideoData')
                        });
                    });
                    $('.ad-banli1').on('click', function (e) {
                        window.open('https://so.m.jd.com/ware/search.action?keyword=%E6%9D%BF%E6%A0%97');
                        // 第一个浮层广告点击次数
                        nslog(location.href, 2021, {
                            module: 'article-n',
                            page: 'index',
                            pos: 'video-ad1-click',
                            action: 'click',
                            strongCorrelation: strongCorrelation,
                            recommendVideoData: F.context('recommendVideoData')
                        });
                    });
                }
                if (currentTime > 25 && currentTime < 35) {
                    if (+$('#videoAd').length) {
                        $('#videoAd').remove();
                    }
                }
                if (currentTime > 35 && currentTime < 50) {
                    if (+$('#videoAd').length || closeAd2) {
                        return 1;
                    }
                    $wp.append(videoAdTpl({adClass: 'ad-banli2'}));
                    // 第二个浮层广告展现次数
                    nslog(location.href, 2021, {
                        module: 'article-n',
                        page: 'index',
                        pos: 'video-ad2-show',
                        action: 'show',
                        strongCorrelation: strongCorrelation,
                        recommendVideoData: F.context('recommendVideoData')
                    });

                    $('.ad-banli2-close').on('click', function (e) {
                        closeAd2 = true;
                        e.stopPropagation();
                        $('#videoAd').remove();
                        // 第二个浮层广告点击关闭次数
                        nslog(location.href, 2021, {
                            module: 'article-n',
                            page: 'index',
                            pos: 'video-ad2-click-close',
                            action: 'click',
                            strongCorrelation: strongCorrelation,
                            recommendVideoData: F.context('recommendVideoData')
                        });
                    });
                    $('.ad-banli2').on('click', function (e) {
                        window.open('https://so.m.jd.com/ware/search.action?keyword=%E6%A0%97%E4%BB%81');
                        // 第二个浮层广告点击次数
                        nslog(location.href, 2021, {
                            module: 'article-n',
                            page: 'index',
                            pos: 'video-ad2-click',
                            action: 'click',
                            strongCorrelation: strongCorrelation,
                            recommendVideoData: F.context('recommendVideoData')
                        });
                    });
                }
                if (currentTime > 50) {
                    if (+$('#videoAd').length) {
                        $('#videoAd').remove();
                    }
                }
            }
            // 片尾（80%）打点
            if (currentTime >= tailTime) {
                if (!tailFlag) {
                    tailFlag = true; // 片尾区域标记
                    nslog(location.href, 2021, {
                        module: 'article-n',
                        page: 'index',
                        pos: 'header-video',
                        action: 'video-tail',
                        eidEnc: eidEnc,
                        encVid: encVid,
                        videoShowCase: +videoShowCase,
                        strongCorrelation: strongCorrelation,
                        wapDetailTest: F.context('wapDetailTest'),
                        newVersion: F.context('newVersion'),
                        autoPlay: F.context('autoPlay'),
                        recommendVideoData: F.context('recommendVideoData'),
                        supportAutoPlay: supportAutoPlay ? 1 : 0
                    });
                    // 2018打点收敛
                    videoExpSend({
                        action: 'done',
                        supportAutoPlay: supportAutoPlay ? 1 : 0
                    });
                }
                playFlag = false; // 重置播放标识
            } else {
                tailFlag = false;
                // 多次播放打点
                if (!playFlag) {
                    // 2018打点收敛
                    videoExpSend({
                        action: 'play',
                        autoPlay: F.context('autoPlay'),
                        supportAutoPlay: supportAutoPlay ? 1 : 0
                    });
                    playFlag = true;
                }
            }
        });

        player.addEventListener('ended', function () {
            F.context('autoPlay', '0');
            if (tailFlag) {
                nslog(location.href, 2021, {
                    module: 'article-n',
                    page: 'index',
                    pos: 'header-video',
                    action: 'ended',
                    eidEnc: eidEnc,
                    encVid: encVid,
                    videoShowCase: +videoShowCase,
                    strongCorrelation: strongCorrelation,
                    wapDetailTest: F.context('wapDetailTest'),
                    newVersion: F.context('newVersion'),
                    recommendVideoData: F.context('recommendVideoData'),
                    supportAutoPlay: supportAutoPlay ? 1 : 0
                });
                if (validFlag && (validDuration / 1000) >= validTime) {
                    nslog(location.href, 2021, {
                        module: 'article-n',
                        page: 'index',
                        pos: 'header-video',
                        action: 'valid-play',
                        eidEnc: eidEnc,
                        encVid: encVid,
                        videoProducer: 'jingyan',
                        videoShowCase: +videoShowCase,
                        strongCorrelation: strongCorrelation,
                        wapDetailTest: F.context('wapDetailTest'),
                        newVersion: F.context('newVersion'),
                        recommendVideoData: F.context('recommendVideoData'),
                        supportAutoPlay: supportAutoPlay ? 1 : 0
                    });
                    // console.log('有效播放次数打点, validDuration: ', validDuration / 1000);
                }
                // 2018打点收敛
                videoExpSend({
                    action: 'over',
                    supportAutoPlay: supportAutoPlay ? 1 : 0
                });
            }
            tailFlag = false; // 清空标识位
            playFlag = false;
            validFlag = false;
            validDuration = 0;
        });

        if (!playFlag) {
            // 2018打点收敛
            videoExpSend({
                action: 'play',
                autoPlay: F.context('autoPlay'),
                supportAutoPlay: supportAutoPlay ? 1 : 0
            });
            playFlag = true;
        }

        ec.emit('exp-video/play');

        ec.on('douwan-video/play', function () {
            stop();
        });
        ec.on('feed-video/play', function () {
            stop();
        });
    }
}

function userClickPlay(playUrl, encVid, eidEnc, videoShowCase, videoDuration, coverImage) {
    $wp.on('click', '.video-img, .video-img-cover, .video-ssc-mask', function (e, data) {
        var me = this;
        nslog(location.href, 2021, {
            module: 'article-n',
            page: 'index',
            pos: 'video-img',
            action: 'click',
            eidEnc: eidEnc,
            videoShowCase: +videoShowCase,
            gifCover: F.context('gifCover') || 0,
            encVid: encVid,
            strongCorrelation: strongCorrelation,
            wapDetailTest: F.context('wapDetailTest'),
            newVersion: F.context('newVersion'),
            recommendVideoData: F.context('recommendVideoData'),
            showVideoFeeds: F.context('showVideoFeeds')
        });

        var showVideoFeeds = F.context('showVideoFeeds');
        // 进入视频流弹层
        if (+showVideoFeeds && !isFeedPlayExpCmp) {
            var videoFeeds = new VideoFeeds({
                from: 'exp-cover',
                feedList: feedList
            });
            ec.emit('feed-video/play');
            return;
        }

        $('.video-img-cover').hide();

        // $(this).hide();
        expVideoPlayer = new ExpVideoPlayer('exp-video-player-container', {src: playUrl, autoplay: true});
        // $(this).after(tpl({playUrl: playUrl}));

        // var playPromise = $('video', $wp)[0].play();
        // if (playPromise !== undefined) {
        //     playPromise.then(function () {
        //         $(me).hide();
        //         // 显示视频下方用户交互组件（赞、分享）
        //         handleVideoInteractFooter();
        //         F.context('autoPlay', '1');
        //         supportAutoPlay = true;
        //         // 支持自动播放时，触碰到视频就要把静音去掉
        //         $('video', $wp).on('touchstart', function () {
        //             $('video', $wp)[0].muted = false;
        //         });
        //     }).catch(function () {
        //         $(me).show();
        //         $('video', $wp).remove();
        //         F.context('autoPlay', '0');
        //         supportAutoPlay = false;
        //         // 不支持自动播放时，开始播放就要把静音去掉
        //         ec.on('exp-video/play', function (data) {
        //             if (supportAutoPlay === false) {
        //                 $('video', $wp)[0].muted = false;
        //                 muted = false;
        //             }
        //         });
        //     });
        // }
        // else if (data && data.autoPlay) {
        //     $(me).show();
        //     $('video', $wp).remove();
        //     F.context('autoPlay', '0');
        //     return;
        // }
        handleVideoInteractFooter();

        bizVideoLog(playUrl, encVid, eidEnc, videoShowCase, videoDuration, coverImage);
    });
}

function videoAutoPlay(playUrl, encVid, eidEnc, videoShowCase, videoDuration, coverImage) {
    expVideoPlayer = new ExpVideoPlayer('exp-video-player-container', {
        src: playUrl,
        autoplay: true,
        muted: true
    });
    handleVideoInteractFooter();

    bizVideoLog(playUrl, encVid, eidEnc, videoShowCase, videoDuration, coverImage);
    $('.video-img-cover').hide();
}

exports.init = init;
 
});
;define("article-n:widget/v2017/exp-recommend-video/exp-recommend-video.js",function(e,o,n){function t(e){if(c(".recommend-video-content-footer .view-num").length){d(location.href,2021,{action:"center-show",module:"article-n",page:"index",intention:"recommend-video-data",recommendVideoData:F.context("recommendVideoData")}),a({action:"show",videoType:3});var o=c(".recommend-video-content-footer .view-num"),n=+o.html();o.html(i(n)),c(".recommend-video-container").on("click",function(o){a({action:"play",videoType:3}),window.open(e),d(location.href,2021,{action:"click",module:"article-n",page:"index",pos:c(o.target).attr("class"),intention:"recommend-video-data",recommendVideoData:F.context("recommendVideoData")})})}}function i(e){var o=0;return o=e>9999?Math.floor(e/1e4)+"万+":e}var c=e("common:widget/lib/gmu/zepto/zepto.js"),d=e("common:widget/ui/nslog/nslog.js"),a=e("article-n:widget/v2017/js/logic/nslog-exp/nslog-exp.es").videoExpSend;n.exports.init=t});
;define("article-n:widget/v2017/floatButton/floatButton.js",function(e,o,n){var t=e("common:widget/lib/gmu/zepto/zepto.js"),i=e("common:widget/share/share.js"),a=e("common:widget/ui/nslog/nslog.js"),r=e("common:widget/js/util/ajax/ajax.es").ajax,c=e("common:widget/ui/transform/transform.es"),l=e("common:widget/ui/exp-touch/exp-touch.es"),s={toolBtn:t("#tool-btn"),init:function(e){var o=this;o.toolBtn.on("click",function(e){e.preventDefault(),e.stopPropagation();var n="addFavorExp";o.toolBtn.hasClass("has-marked")&&(n="cancelFavorExp"),r({type:"POST",url:"/common/isLogin/?_t="+ +new Date,dataType:"json"}).then(function(e){if(0===e.errno)return void o.favorSubmit(n);var t=location.href.indexOf("?")>-1?"&":"?",i=location.href+t;location.href="https://wappass.baidu.com/passport/?u="+encodeURIComponent(i)+"&tpl=exp"})}),t(window).on("scroll",function(){0!==t("#tool-btn").length&&t("#tool-btn").offset().left}),o.wiseReturn(),o.wiseReturnLeftHandler(),o.wiseReturnLog(e)},wiseReturn:function(){var e=t("#return-wise-center"),o=t("#return-wise-left");t(document.body).on("touchmove",function(n){e.length&&e.hide(),o.length&&(t(n.target).parents("#return-wise-left").length||o.hide())}),t(document.body).on("touchend",function(){e.length&&e.show(),o.length&&o.show()})},wiseReturnLeftHandler:function(){var e=t("#return-wise-left")[0];if(e){var o=t(e).height(),n=150,i=-(t(window).height()-n-o);c(e,!0);var a=new l({touch:e,vertical:!0,target:e,property:"translateY",sensitivity:1,factor:1,min:i,max:n,step:40,animationEnd:function(){},pressMove:function(){},touchEnd:function(){}});t(window).on("resize",function(){a.min=-(t(window).height()-n-o),a.to(Math.max(a.min,a.target[a.property]))})}},wiseReturnLog:function(e){function o(){var e=window.scrollY,n=window.innerHeight,i=t(document).height();e+n===i&&(t(window).off("scroll",o),a(location.href,2021,{action:"wise-scrollToBottom",module:"article-n",page:"index",expGroup:r}))}var n=t("#return-wise-center"),i=t("#return-wise-left"),r=F.context("wapDetailTest");if(e){var c=window.navigator.userAgent,l="unknown";c.toLowerCase().indexOf("baidu")>0?l="baidu":c.toLowerCase().indexOf("qq")>0?l="qq":c.toLowerCase().indexOf("liebao")>0?l="liebao":c.toLowerCase().indexOf("uc")>0?l="uc":c.toLowerCase().indexOf("chrome")>0?l="chrome":c.toLowerCase().indexOf("safari")>0?l="safari":c.toLowerCase().indexOf("sougou")>0&&(l="sougou"),a(location.href,2021,{action:"wise-hitReturnWisePV",module:"article-n",page:"index",expGroup:r}),t(".exp-img-opt").on("click",function(){a(location.href,2021,{action:"wise-clickToStepFromAlbum",module:"article-n",page:"index",expGroup:r})}),t(".go-to-step-text").on("click",function(){a(location.href,2021,{action:"wise-clickToStepFromIndex",module:"article-n",page:"index",recommendVideoData:F.context("recommendVideoData"),expGroup:r})}),t(".like").on("click",function(){a(location.href,2021,{action:"wise-like",module:"article-n",page:"index",recommendVideoData:F.context("recommendVideoData"),expGroup:r})}),t(".dislike").on("click",function(){a(location.href,2021,{action:"wise-dislike",module:"article-n",page:"index",recommendVideoData:F.context("recommendVideoData"),expGroup:r})}),t(".share-btn").on("click",function(){a(location.href,2021,{action:"wise-share-btn",module:"article-n",page:"index",recommendVideoData:F.context("recommendVideoData"),expGroup:r})}),t(".mark-block").on("click",function(){a(location.href,2021,{action:"wise-mark-btn",module:"article-n",page:"index",recommendVideoData:F.context("recommendVideoData"),expGroup:r})}),t(window).on("scroll",o),t(".block-item").on("click",function(){a(location.href,2021,{action:"wise-clickToStepFromText",module:"article-n",page:"index",recommendVideoData:F.context("recommendVideoData"),expGroup:r})}),i.length>0&&a(location.href,2021,{action:"wise-show-left-btn-browser",module:"article-n",page:"index",expGroup:r,browser:l}),n.length>0&&a(location.href,2021,{action:"wise-show-center-btn-browser",module:"article-n",page:"index",expGroup:r,browser:l}),i.length>0&&i.on("click",function(){a(location.href,2021,{action:"wise-returnWiseLeftBtnClickBrowser",module:"article-n",page:"index",expGroup:r,browser:l})}),n.length>0&&n.on("click",function(){a(location.href,2021,{action:"wise-returnWiseCenterBtnClickBrowser",module:"article-n",page:"index",expGroup:r,browser:l})}),i.length>0&&a(location.href,2021,{action:"wise-show-left-btn-engine",module:"article-n",page:"index",engine:e.from,expGroup:r}),n.length>0&&a(location.href,2021,{action:"wise-show-center-btn-engine",module:"article-n",page:"index",engine:e.from,expGroup:r}),i.length>0&&i.on("click",function(){a(location.href,2021,{action:"wise-returnWiseLeftBtnClickEngine",module:"article-n",page:"index",engine:e.from,expGroup:r})}),n.length>0&&n.on("click",function(){a(location.href,2021,{action:"wise-returnWiseCenterBtnClickEngine",module:"article-n",page:"index",engine:e.from,expGroup:r})})}},showTip:function(e,o){var n=t(".tptool"),r=n.find(".favor-tip");r.html(e),n.addClass("show"),setTimeout(function(){n.removeClass("show")},o||3e3),t(".favor-share").length&&t(".favor-share").one("click",function(){i.open(),a(location.href,2021,{module:"article-n",action:"click",page:"index",pos:"favor-share-open",style:F.context("expStyle"),recommendVideoData:F.context("recommendVideoData")}),n.removeClass("show")})},favorSubmit:function(e){{var o=this;F.context("eidEnc")}r({type:"POST",url:"/submit/favor",data:{method:e,eidEnc:F.context("eidEnc")},dataType:"json",timeout:2e3}).then(function(n){var t=1e3;if(0!==n.errno)return void o.showTip("收藏失败，请稍候重试",t);var i='<p class="favor-share"><i class="i-share"></i>分享给小伙伴</p>';"addFavorExp"===e?(o.toolBtn.addClass("has-marked"),t=3e3,a(location.href,2021,{action:"click",module:"article-n",page:"index",pos:"add-favor",style:F.context("expStyle"),wapDetailTest:F.context("wapDetailTest"),recommendVideoData:F.context("recommendVideoData")})):(i="取消收藏",o.toolBtn.removeClass("has-marked").addClass("mark-block"),a(location.href,2021,{action:"click",module:"article-n",page:"index",pos:"cancel-favor",style:F.context("expStyle"),wapDetailTest:F.context("wapDetailTest"),recommendVideoData:F.context("recommendVideoData")})),o.showTip(i,t)})}};n.exports=s});
;define("article-n:widget/v2017/format-content/exp-content/douwan-video.js",function(require,exports,module){function once(e){var o=0;return function(){o>=1||(o+=1,e.apply(this,arguments))}}function stopAllVideo(e){e.find(".exp-video-player").remove(),e.find(".video-img").show()}function init(){var e,o=F.context("wapDetailTest");$(document).ready(function(){e=$(".wgt-douwan-video-opt"),new $.Lazyload($(".wgt-douwan-video-opt .video-img img"),{tag:"img",clear:!1}),e.on("click",".video-img",function(){var t=$(this),n=t.parent(),i=n.data("playurl");stopAllVideo(e);var r=(new ExpVideoPlayer($(this).next(),{src:i}),n.find("video")[0]);r.addEventListener("play",function(){ec.emit("douwan-video/play")}),r.play(),nslog(location.href,2021,{module:"article-n",page:"index",pos:"douwan-video",action:"click",wapDetailTest:o,newVersion:F.context("newVersion"),recommendVideoData:F.context("recommendVideoData")})}),ec.on("exp-video/play",function(){stopAllVideo(e)})})}var $=require("common:widget/lib/gmu/zepto/zepto.js"),nslog=require("common:widget/ui/nslog/nslog.js"),ec=require("common:widget/js/util/event/event.es").event,lazyload=require("common:widget/ui/lazyload/lazyload.js"),tp=require("common:widget/js/util/template/template.es"),ExpVideoPlayer=require("common:widget/exp-video-player/exp-video-player.es"),tpl=function render(data){"use strict";var keyArr=[],valArr=[];data=data||{},data.__encodeHTML__=window.template.__encodeHTML;for(var key in data)keyArr.push('"'+key+'"'),valArr.push(data[key]);var source="new Function("+keyArr.join(",")+', "\\"use strict\\";var __code__ = \\"\\";;__code__ += (\\"<video controls autoplay webkit-playsinline playsinline>     <source src=\\\\\\"\\");__code__ += (__encodeHTML__(typeof (playUrl) === \\"undefined\\" ? \\"\\" : playUrl));__code__ += (\\"\\\\\\" type=\\\\\\"video/mp4\\\\\\">     <p>         你的浏览器不支持视频播放，请下载播放，<a href=\\\\\\"\\");__code__ += (__encodeHTML__(typeof (playUrl) === \\"undefined\\" ? \\"\\" : playUrl));__code__ += (\\"\\\\\\">点击下载</a>。     </p> </video> \\");return __code__")';try{var fn=eval(source),html=fn.apply(null,valArr)}catch(e){return e.name="RenderError",e.tpl="article-n:widget/v2017/format-content/exp-content/douwan-video.tmpl",window.template.__handelError(e),"template.js error"}return html};exports.init=once(init)});
;define("article-n:widget/v2017/format-content/exp-iframe/exp-iframe.js",function(t,e){function i(){a(".wgt-exp-iframe").each(function(){var t=a(this);t.height(9*t.width()/16)});var t=a(".wgt-step-read"),e=t.next();e.is(".wgt-exp-iframe")?(t.addClass("mb0"),e.addClass("mt0 mb8-5")):e.is(".iframe-container-opt")&&(t.addClass("mb0"),e.find(".iframe-opt").addClass("mt0 mb8-5"))}var a=t("common:widget/lib/gmu/zepto/zepto.js");e.init=i});
;define("article-n:widget/v2017/format-content/exp-need/exp-food.js",function(e,o,t){function n(){var e=i("#wgt-exp-food"),o=i(".wp",e),t=i(".wp-inner",e),n=i(".more",e);t.height()>60&&n.show(),n.on("click",function(e){e.preventDefault(),n.hide(),o.addClass("big"),d.emit("calculateTop")}),+i(".ad-right").length&&i(".ad-right").on("click",function(){c(location.href,2021,{module:"article-n",page:"index",pos:"video-text-ad-click",action:"click",recommendVideoData:F.context("recommendVideoData")}),window.open("https://so.m.jd.com/ware/search.action?keyword=%E6%9D%BF%E6%A0%97")})}var i=e("common:widget/lib/gmu/zepto/zepto.js"),c=e("common:widget/ui/nslog/nslog.js"),d=e("common:widget/js/util/event/event.es").event;t.exports.init=n});
;define("article-n:widget/v2017/format-content/exp-need/exp-tool.js",function(e,o,t){function n(){var e=i("#wgt-exp-tool"),o=i(".wp",e),t=i(".wp-inner",e),n=i(".more",e);t.height()>32&&n.show(),n.on("click",function(e){e.preventDefault(),n.hide(),o.addClass("big"),a.emit("calculateTop")}),i(".icon-box").on("click",function(){c(location.href,2021,{module:"article-n",page:"index",pos:"video-text-ad-click",action:"click",recommendVideoData:F.context("recommendVideoData")}),window.open("https://so.m.jd.com/ware/search.action?keyword=%E6%9D%BF%E6%A0%97")}),i(".buy-text").on("click",function(){c(location.href,2021,{module:"article-n",page:"index",pos:"video-text-ad-click",action:"click",recommendVideoData:F.context("recommendVideoData")}),window.open("https://so.m.jd.com/ware/search.action?keyword=%E6%9D%BF%E6%A0%97")})}var i=e("common:widget/lib/gmu/zepto/zepto.js"),c=e("common:widget/ui/nslog/nslog.js"),a=e("common:widget/js/util/event/event.es").event;t.exports.init=n});
;define("article-n:widget/v2017/format-content/exp-notice/exp-notice.js",function(e,n,o){var i=e("common:widget/lib/gmu/zepto/zepto.js"),t=e("common:widget/ui/nslog/nslog.js"),c={init:function(){var e=this;e.eventHandler()},eventHandler:function(){var e=i("#header"),n=e.find(".more"),o=i("#notice-container");o.height()>84&&(n.show(),o.addClass("notice-small"),e.on("click",function(){n.hide(),o.removeClass("notice-small").addClass("notice-big"),t(location.href,2021,{module:"article-n",page:"index",action:"click",pos:"qb-notice",recommendVideoData:F.context("recommendVideoData")})}))}};o.exports=c});
;define("article-n:widget/v2017/format-content/format-content.js",function(require,exports,module){function init(e,t){function o(){var e=$(".wgt-exp-content .exp-img-opt"),t=$(".wgt-exp-content .wgt-douwan-video-opt"),o=(e.first().width(),t.first().width()),n=9*o/16;t.css("height",n+"px")}var n=$(".wgt-exp-content"),i=$(".block-ol, .block-ul, .block-p",n);$(".wgt-exp-content a").length&&$(".wgt-exp-content a").on("click",function(e){e.preventDefault()}),$("#abstract a").length&&$("#abstract a").on("click",function(e){e.preventDefault()}),$(".go-to-step-text").length&&$(".go-to-step-text").on("click",function(){var e=$(this).parent().parent().attr("href");F.context("wiseIvk")&&(e+="&ivk_sa="+F.context("wiseIvk")),window.open(e,"_self")});var a=F.context("wapDetailTest");i.each(function(e,t){var o=$(t),n=[],i=o.find(".block-img");o.data("index",e),i.each(function(){var e=$(this);n.push({src:e.data("src"),osrc:e.data("osrc")})}),imgMap[e]=n,i.last().after(expImgSingleTpl({list:n,expImgTpl:expImgTpl,group:a})),i.remove()});$(".exp-img").attr("_src");new $.Lazyload($(".exp-img-opt img",n),{afterImgLoad:function(){$.each($(".exp-img-opt img.isloaded").not(".hasUnfolded"),function(){$(this).height()>+$(this).parent().css("max-height").replace("px","")&&($(this).parent().next(".exp-img-mask").show(),$(this).parent().next().next(".unfold").css("display","block"))})}}),n.on("click",".more-img, .more-img-mask, .more-img-opt",function(e){e.preventDefault();var t=$(this),o=t.closest(".exp-img-wp"),n=t.closest(".block-ul, .block-ol, .block-p").data("index");o.find(".exp-img-opt").css("max-height","none"),o.find(".exp-img-mask").hide(),o.find(".more-img, .more-img-opt").hide(),o.after(expImgTpl({list:imgMap[n].slice(1),lazy:!1,group:a})),nslog(location.href,2021,{action:"click",module:"article-n",page:"index",pos:"more-img",wapDetailTest:a,newVersion:F.context("newVersion"),recommendVideoData:F.context("recommendVideoData")})}),n.on("click",".unfold, .unfold-mask",function(e){e.preventDefault();var t=$(this),o=t.closest(".block-ul, .block-ol, .block-p");o.find(".exp-img-opt").css("max-height","unset !important"),o.find("img").addClass("hasUnfolded"),o.find(".exp-img-mask").hide(),o.find(".unfold").hide(),nslog(location.href,2021,{action:"click",module:"article-n",page:"index",pos:"unfold",wapDetailTest:a,newVersion:F.context("newVersion"),recommendVideoData:F.context("recommendVideoData")})}),n.on("click",".block-item",function(){nslog(location.href,2021,{action:"click",module:"article-n",page:"index",pos:"block-item",newQBFlag:t,wapDetailTest:a,videoShowCase:F.context("videoShowCase"),strongCorrelation:F.context("strongCorrelation"),newVersion:F.context("newVersion"),recommendVideoData:F.context("recommendVideoData")})}).on("click",".exp-img, .exp-img-opt img",function(){nslog(location.href,2021,{action:"click",module:"article-n",page:"index",pos:"exp-img",newQBFlag:t,wapDetailTest:a,videoShowCase:F.context("videoShowCase"),strongCorrelation:F.context("strongCorrelation"),newVersion:F.context("newVersion"),recommendVideoData:F.context("recommendVideoData")})}),$(".go-to-step-text").on("click",function(){nslog(location.href,2021,{action:"click",module:"article-n",page:"index",pos:"go-to-step-text",newQBFlag:t,wapDetailTest:a,videoShowCase:F.context("videoShowCase"),strongCorrelation:F.context("strongCorrelation"),newVersion:F.context("newVersion"),recommendVideoData:F.context("recommendVideoData")})}),e&&e.length&&initPhotoSwipeFromDOM(e,".exp-img-opt-img"),document.addEventListener("DOMContentLoaded",o),window.addEventListener("orientationchange"in window?"orientationchange":"resize",o)}var $=require("common:widget/lib/gmu/zepto/zepto.js"),lazyload=require("common:widget/ui/lazyload/lazyload.js"),tp=require("common:widget/js/util/template/template.es"),initPhotoSwipeFromDOM=require("article-n:widget/v2017/js/ui/swiper/swiper.es"),nslog=require("common:widget/ui/nslog/nslog.js"),expImgTpl=function render(data){"use strict";var keyArr=[],valArr=[];data=data||{},data.__encodeHTML__=window.template.__encodeHTML;for(var key in data)keyArr.push('"'+key+'"'),valArr.push(data[key]);var source="new Function("+keyArr.join(",")+', "\\"use strict\\";var __code__ = \\"\\";;__code__ += (\\"\\");list.forEach(function(v) {;__code__ += (\\"     <div class=\\\\\\"exp-img-opt\\\\\\">         <img class=\\\\\\"exp-img-opt-img\\\\\\" data-osrc=\\\\\\"\\");__code__ += (__encodeHTML__(typeof (v.osrc) === \\"undefined\\" ? \\"\\" : v.osrc));__code__ += (\\"\\\\\\" \\");if (lazy) {;__code__ += (\\"_src=\\\\\\"\\");__code__ += (__encodeHTML__(typeof (v.src) === \\"undefined\\" ? \\"\\" : v.src));__code__ += (\\"\\\\\\"\\");} else {;__code__ += (\\"src=\\\\\\"\\");__code__ += (__encodeHTML__(typeof (v.src) === \\"undefined\\" ? \\"\\" : v.src));__code__ += (\\"\\\\\\"\\");};__code__ += (\\">     </div> \\");});__code__ += (\\" \\");return __code__")';try{var fn=eval(source),html=fn.apply(null,valArr)}catch(e){return e.name="RenderError",e.tpl="article-n:widget/v2017/format-content/exp-img.tmpl",window.template.__handelError(e),"template.js error"}return html},expImgSingleTpl=function render(data){"use strict";var keyArr=[],valArr=[];data=data||{},data.__encodeHTML__=window.template.__encodeHTML;for(var key in data)keyArr.push('"'+key+'"'),valArr.push(data[key]);var source="new Function("+keyArr.join(",")+', "\\"use strict\\";var __code__ = \\"\\";;__code__ += (\\"\\");if (list.length > 1) {;__code__ += (\\"     \\");/* 多张图片情况 */;__code__ += (\\"     <div class=\\\\\\"exp-img-wp\\\\\\">         \\");__code__ += (typeof (expImgTpl({list: list.slice(0, 1), lazy: true, type: \'more-img-mask\', group: group})) === \\"undefined\\" ? \\"\\" : expImgTpl({list: list.slice(0, 1), lazy: true, type: \'more-img-mask\', group: group}));__code__ += (\\"         <a class=\\\\\\"more-img-opt\\\\\\"><span>查看剩余\\");__code__ += (typeof ((list.length-1)) === \\"undefined\\" ? \\"\\" : (list.length-1));__code__ += (\\"张图<b></b></span></a>     </div> \\");} else if (list.length === 1) {;__code__ += (\\"     \\");/* 一张图片情况 */;__code__ += (\\"     \\");__code__ += (typeof (expImgTpl({list: list, lazy: true, type: \'unfold-mask\', group: group})) === \\"undefined\\" ? \\"\\" : expImgTpl({list: list, lazy: true, type: \'unfold-mask\', group: group}));__code__ += (\\" \\");};__code__ += (\\" \\");return __code__")';try{var fn=eval(source),html=fn.apply(null,valArr)}catch(e){return e.name="RenderError",e.tpl="article-n:widget/v2017/format-content/exp-img-single.tmpl",window.template.__handelError(e),"template.js error"}return html},imgMap=[],webP=require("common:widget/js/util/detect-webp/detect-webp.es");module.exports.init=init});
;define("article-n:widget/v2017/hot-exp/hot-exp.es",function(require,exports,module){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),_commonWidgetLibGmuZeptoZeptoJs=require("common:widget/lib/gmu/zepto/zepto.js"),_commonWidgetLibGmuZeptoZeptoJs2=_interopRequireDefault(_commonWidgetLibGmuZeptoZeptoJs);require("common:widget/js/util/template/template.es");var _commonWidgetUiLazyloadLazyloadJs=require("common:widget/ui/lazyload/lazyload.js"),_commonWidgetUiLazyloadLazyloadJs2=_interopRequireDefault(_commonWidgetUiLazyloadLazyloadJs),_commonWidgetUiNslogNslogJs=require("common:widget/ui/nslog/nslog.js"),_commonWidgetUiNslogNslogJs2=_interopRequireDefault(_commonWidgetUiNslogNslogJs),HotExp=function(){function HotExp(){_classCallCheck(this,HotExp),this.type=1,this.tab={1:"day",2:"week"},this.next=[0,0],this.isLoading=[!1,!1],this.hotExpTpl=function render(data){var keyArr=[],valArr=[];data=data||{},data.__encodeHTML__=window.template.__encodeHTML;for(var key in data)keyArr.push('"'+key+'"'),valArr.push(data[key]);var source="new Function("+keyArr.join(",")+', "\\"use strict\\";var __code__ = \\"\\";;__code__ += (\\"\\");for (var i = 0; i < list.length; i++) {;__code__ += (\\" <li>     <a href=\\\\\\"/article/\\");__code__ += (__encodeHTML__(typeof (list[i].data[0].eidEnc) === \\"undefined\\" ? \\"\\" : list[i].data[0].eidEnc));__code__ += (\\".html\\\\\\">         \\");if (list[i].data[0].hasVideo == true){;__code__ += (\\"             <div class=\\\\\\"hot-item-left\\\\\\">                 <span class=\\\\\\"title title-left\\\\\\">\\");__code__ += (__encodeHTML__(typeof (list[i].data[0].title) === \\"undefined\\" ? \\"\\" : list[i].data[0].title));__code__ += (\\"</span>                 <span class=\\\\\\"view-num view-num-left\\\\\\">阅读&nbsp;\\");__code__ += (__encodeHTML__(typeof (list[i].data[0].browserTimes) === \\"undefined\\" ? \\"\\" : list[i].data[0].browserTimes));__code__ += (\\"</span>             </div>             <div class=\\\\\\"hot-item-right\\\\\\">                 <span class=\\\\\\"cover-right\\\\\\" _src=\\\\\\"\\");__code__ += (__encodeHTML__(typeof (list[i].data[0].videoPoster) === \\"undefined\\" ? \\"\\" : list[i].data[0].videoPoster));__code__ += (\\"\\\\\\"></span>                 <span class=\\\\\\"video-icon\\\\\\"></span>             </div>         \\");}else if (list[i].data[0].image.length == 3){;__code__ += (\\"             <div class=\\\\\\"title\\\\\\">\\");__code__ += (__encodeHTML__(typeof (list[i].data[0].title) === \\"undefined\\" ? \\"\\" : list[i].data[0].title));__code__ += (\\"</div>             <div class=\\\\\\"pic\\\\\\">                 <span class=\\\\\\"pic-item\\\\\\" _src=\\\\\\"\\");__code__ += (__encodeHTML__(typeof (list[i].data[0].image[0]) === \\"undefined\\" ? \\"\\" : list[i].data[0].image[0]));__code__ += (\\"\\\\\\"></span><!--去除间距                 --><span class=\\\\\\"pic-item\\\\\\" _src=\\\\\\"\\");__code__ += (__encodeHTML__(typeof (list[i].data[0].image[1]) === \\"undefined\\" ? \\"\\" : list[i].data[0].image[1]));__code__ += (\\"\\\\\\"></span><!--                 --><span class=\\\\\\"pic-item\\\\\\" _src=\\\\\\"\\");__code__ += (__encodeHTML__(typeof (list[i].data[0].image[2]) === \\"undefined\\" ? \\"\\" : list[i].data[0].image[2]));__code__ += (\\"\\\\\\"></span>             </div>             <div class=\\\\\\"view-num\\\\\\">阅读&nbsp;\\");__code__ += (__encodeHTML__(typeof (list[i].data[0].browserTimes) === \\"undefined\\" ? \\"\\" : list[i].data[0].browserTimes));__code__ += (\\"</div>         \\");}else if (list[i].data[0].image.length == 1 || list[i].data[0].image.length == 2){;__code__ += (\\"             <div class=\\\\\\"hot-item-left\\\\\\">                 <span class=\\\\\\"title title-left\\\\\\">\\");__code__ += (__encodeHTML__(typeof (list[i].data[0].title) === \\"undefined\\" ? \\"\\" : list[i].data[0].title));__code__ += (\\"</span>                 <span class=\\\\\\"view-num view-num-left\\\\\\">阅读&nbsp;\\");__code__ += (__encodeHTML__(typeof (list[i].data[0].browserTimes) === \\"undefined\\" ? \\"\\" : list[i].data[0].browserTimes));__code__ += (\\"</span>             </div>             <div class=\\\\\\"hot-item-right\\\\\\">                 <span class=\\\\\\"cover-right\\\\\\" _src=\\\\\\"\\");__code__ += (__encodeHTML__(typeof (list[i].data[0].image[0]) === \\"undefined\\" ? \\"\\" : list[i].data[0].image[0]));__code__ += (\\"\\\\\\"></span>             </div>         \\");}else if (list[i].data[0].image.length == 0){;__code__ += (\\"             <span class=\\\\\\"title\\\\\\">\\");__code__ += (__encodeHTML__(typeof (list[i].data[0].title) === \\"undefined\\" ? \\"\\" : list[i].data[0].title));__code__ += (\\"</span>             <span class=\\\\\\"view-num\\\\\\">阅读&nbsp;\\");__code__ += (__encodeHTML__(typeof (list[i].data[0].browserTimes) === \\"undefined\\" ? \\"\\" : list[i].data[0].browserTimes));__code__ += (\\"</span>         \\");};__code__ += (\\"     </a> </li> \\");};return __code__")';try{var fn=eval(source),html=fn.apply(null,valArr)}catch(e){return e.name="RenderError",e.tpl="article-n:widget/v2017/hot-exp/hot-exp.tmpl",window.template.__handelError(e),"template.js error"}return html},this.init()}return _createClass(HotExp,[{key:"init",value:function(){this.loadHotExp(1,_commonWidgetLibGmuZeptoZeptoJs2["default"](".hot-exp-list-day")),this.eventHandler()}},{key:"eventHandler",value:function(){var e=this;_commonWidgetLibGmuZeptoZeptoJs2["default"](".hot-tab").on("click","span",function(t){var i=_commonWidgetLibGmuZeptoZeptoJs2["default"](t.currentTarget);i.hasClass("active")||(i.addClass("active").siblings().removeClass("active"),_commonWidgetLibGmuZeptoZeptoJs2["default"](".hot-exp-list-"+i.attr("id")).show().siblings().hide(),e.type=i.attr("data-type"),_commonWidgetLibGmuZeptoZeptoJs2["default"](window).trigger("scroll")),_commonWidgetUiNslogNslogJs2["default"](location.href,2021,{module:"article-n",page:"index",pos:"hot-exp-tab-"+e.tab[e.type],action:"click",encEid:F.context("encEid"),wapDetailTest:F.context("wapDetailTest"),newVersion:F.context("newVersion")})}),_commonWidgetLibGmuZeptoZeptoJs2["default"](window).on("scroll",function(){1===+e.type&&e.next[0]<5?_commonWidgetLibGmuZeptoZeptoJs2["default"](".hot-exp-list-day .load-more").offset().bottom<_commonWidgetLibGmuZeptoZeptoJs2["default"](window).scrollTop()+_commonWidgetLibGmuZeptoZeptoJs2["default"](window).height()&&e.loadHotExp(1,_commonWidgetLibGmuZeptoZeptoJs2["default"](".hot-exp-list-day")):2===+e.type&&e.next[1]<5&&_commonWidgetLibGmuZeptoZeptoJs2["default"](".hot-exp-list-week .load-more").offset().bottom<_commonWidgetLibGmuZeptoZeptoJs2["default"](window).scrollTop()+_commonWidgetLibGmuZeptoZeptoJs2["default"](window).height()&&e.loadHotExp(2,_commonWidgetLibGmuZeptoZeptoJs2["default"](".hot-exp-list-week"))}),_commonWidgetLibGmuZeptoZeptoJs2["default"](".hot-exp-list").on("click","a",function(t){_commonWidgetUiNslogNslogJs2["default"](location.href,2021,{module:"article-n",page:"index",action:"click",pos:"hot-exp-list-"+e.tab[e.type]+"-"+(_commonWidgetLibGmuZeptoZeptoJs2["default"](t.currentTarget).parent("li").index()+1),encEid:F.context("encEid"),wapDetailTest:F.context("wapDetailTest"),newVersion:F.context("newVersion")},!0,_commonWidgetLibGmuZeptoZeptoJs2["default"](t.currentTarget).attr("href"))})}},{key:"loadHotExp",value:function(e,t){var i=this;this.isLoading[e-1]||(this.isLoading[e-1]=!0,_commonWidgetLibGmuZeptoZeptoJs2["default"].ajax({url:"/asyncreq",data:{method:"getRecommend",next:this.next[e-1],type:e,t:Date.now()},beforeSend:function(){t.find(".load-more").text("加载中...")},success:function(o){var a=i.hotExpTpl({list:o.data.list});t.find("ul").append(a),new _commonWidgetUiLazyloadLazyloadJs2["default"](_commonWidgetLibGmuZeptoZeptoJs2["default"](".wgt-hot-exp .cover-right, .wgt-hot-exp .pic-item"),{tag:"div"}),t.find(".load-more").text(i.next[e-1]<4?"上拉加载更多":"没有更多了"),i.next[e-1]+=1,i.isLoading[e-1]=!1},error:function(){t.find(".load-more").text("数据加载失败，请稍后重试"),i.isLoading[e-1]=!1}}),_commonWidgetUiNslogNslogJs2["default"](location.href,2021,{module:"article-n",page:"index",pos:"hot-exp-list-"+this.tab[e],action:"load",encEid:F.context("encEid"),wapDetailTest:F.context("wapDetailTest"),newVersion:F.context("newVersion")}))}}]),HotExp}();exports["default"]=HotExp,module.exports=exports["default"]});
;define("article-n:widget/v2017/like-and-share/like-and-share.js",function(e,t,i){var n=e("common:widget/lib/gmu/zepto/zepto.js"),o=(e("common:widget/share/share.js"),e("common:widget/js/share/share.es")),a=e("common:widget/ui/nslog/nslog.js"),s=e("common:widget/js/util/ajax/ajax.es").ajax,c=e("article-n:widget/v2017/js/ui/like-dislike-act/like-dislike-act.js"),r=e("common:widget/js/util/event/event.es").event,l=e("common:widget/js/util/tool/tool.es").throttle,d={noticeMsg:{1:"非常高兴这篇经验帮到了你",2:"很遗憾这篇经验没有帮到你"},errnoMsg:{2001:"您已经评价过了 :)",2004:"提交过于频繁，请稍后再试~",2041:"您不能评价自己的经验噢~",507:"您还没有设置用户名噢~"},init:function(){var e=this;e.eventHandler()},eventHandler:function(){var e=this;n(".like-btn").on("click",l(function(){var t=n(this);e.type=+t.data("type");var i=t.find("span").hasClass("active"),o={method:"feedback",eidEnc:F.context("eidEnc"),BdStoken:F.context("BdsToken"),bdstt:F.context("bdstt"),type:e.type};s({type:"POST",url:"/common/isLogin/?_t="+ +new Date,dataType:"json"}).then(function(t){if(0===t.errno)return i&&(o.type=5),void c.likeOrNotSubmit(o,function(t){e.controlMsgTip(t.errno,e.errnoMsg[t.errno],o.type)});var n=location.href.indexOf("?")>-1?"&":"?",a=location.href+n+"#bottom";location.href="https://wappass.baidu.com/passport/?u="+encodeURIComponent(a)+"&tpl=exp"})},800)),n(".share-btn").on("click",function(){var e={title:n("title").text(),summary:"解决你所有的生活难题",pic:"https://jingyan.baidu.com/event/img/jingyan-fx.jpg",log:{page:"article-n-v2017"}};o.share(e),a(location.href,2021,{module:"article-n",page:"index",pos:"like-share-open",action:"click",style:F.context("expStyle"),expGroup:F.context("expGroup"),wapDetailTest:F.context("wapDetailTest"),newVersion:F.context("newVersion"),recommendVideoData:F.context("recommendVideoData")})}).on("touchmove",function(){return!1}),r.on("like-status-change",function(t,i){var n=+F.context("likeStatus");e.changeStatus(n,+F.context("likeNum")),0===+i.errno||2001===+i.errno&&e.controlMsgTip(i.errno,e.errnoMsg[i.errno],n)})},changeStatus:function(e,t){switch(e){case 1:n(".i-like").addClass("active"),n(".like .like-info").text(c.formatNum(t)),n(".i-dislike").removeClass("active");break;case 2:n(".i-like").removeClass("active"),n(".like .like-info").text("赞"),n(".i-dislike").addClass("active");break;case 3:n(".i-dislike, .i-like").removeClass("active"),n(".like .like-info").text("赞");default:n(".i-dislike, .i-like").removeClass("active")}},controlMsgTip:function(e,t,i){var o=n(".like-tip-text"),a=o.parent();t=t||"网络错误，请稍候重试!",i&&5!==i&&(a.show(),o.text(2001===+e?1===i?"您已赞过":2===i?"您已踩过":t:t),setTimeout(function(){a.hide()},1500))}};i.exports=d});
;define("article-n:widget/v2017/rel-exp/rel-exp.js",function(e,t,o){var i=e("common:widget/lib/gmu/zepto/zepto.js"),n=e("common:widget/ui/nslog/nslog.js"),a=(e("common:widget/ui/lazyload/lazyload.js"),e("article-n:widget/v2017/video-feeds/video-feeds.es").VideoFeeds),d=e("common:widget/js/util/event/event.es").event,s={init:function(e){this.eventHandler(),this.feedList=e,this.lazyInst=new i.Lazyload(i("#relateExp .img"),{tag:"div"})},eventHandler:function(){i("#relateExp").on("click","a, li",function(e){if(i(e.currentTarget).hasClass("li-ele"))var t=i(this).attr("video-feeds"),o=i(this).find("a").attr("href"),s=i(this).attr("index"),r=i(this).data("pd"),l=i(this).data("recId");else if(i(e.currentTarget).hasClass("a-ele")){e.preventDefault();var t=i(this).parent("li").attr("video-feeds"),o=i(this).attr("href"),s=i(this).parent("li").attr("index"),r=i(this).parent("li").data("pd"),l=i(this).parent("li").data("recId")}F.context("wiseIvk")&&(o+="&ivk_sa="+F.context("wiseIvk"));var c=i(this).parents("ul"),p="relate";if(c.hasClass("video")?p="video":c.hasClass("content")&&(p="text"),"feeds-1"===t||"feeds-2"===t){{new a({from:t,feedList:this.feedList})}d.emit("feed-video/play"),n(location.href,2021,{action:"click",module:"article-n",page:"index",pos:"relate-exp-"+p,encEid:F.context("encEid"),wapDetailTest:F.context("wapDetailTest"),videoShowCase:F.context("videoShowCase"),strongCorrelation:F.context("strongCorrelation"),newVersion:F.context("newVersion"),recommendVideoData:F.context("recommendVideoData"),intention:"video-feeds-log",showVideoFeeds:F.context("showVideoFeeds"),feedVideoGroup:F.context("feedVideoGroup"),index:s,relateExpGroup:F.context("relateExpGroup"),recId:l})}else n(location.href,2021,{action:"click",module:"article-n",page:"index",pos:"relate-exp-"+p,encEid:F.context("encEid"),wapDetailTest:F.context("wapDetailTest"),videoShowCase:F.context("videoShowCase"),strongCorrelation:F.context("strongCorrelation"),newVersion:F.context("newVersion"),recommendVideoData:F.context("recommendVideoData"),intention:"video-feeds-log",showVideoFeeds:F.context("showVideoFeeds"),feedVideoGroup:F.context("feedVideoGroup"),index:s,relateExpGroup:F.context("relateExpGroup"),isPd:r,recId:l},!0,o)}),i(".more-rel-exp").on("click",function(e){e.preventDefault(),n(location.href,2021,{action:"click",module:"article-n",page:"index",pos:"more-relate-exp",wapDetailTest:F.context("wapDetailTest"),encEid:F.context("encEid"),newVersion:F.context("newVersion")},!0,i(this).attr("href"))})}};o.exports=s});
;define("article-n:widget/v2017/rel-magazine/rel-magazine.js",function(e,t,o){var a=e("common:widget/lib/gmu/zepto/zepto.js");e("common:widget/ui/lazyload/lazyload.js");var n=e("common:widget/ui/nslog/nslog.js"),i={init:function(){var e=a("#magazineList"),t=e.find("em");new a.Lazyload(t,{tag:"em"}),e.on("click","a",function(){n(location.href,2021,{action:"click",module:"article-n",page:"index",pos:"relate-mag",style:F.context("expStyle"),expGroup:F.context("expGroup"),wapDetailTest:F.context("wapDetailTest"),recommendVideoData:F.context("recommendVideoData")})})}};o.exports=i});
;define("article-n:widget/v2017/star-scorer/star-scorer.es",function(t,e,a){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var a=0;a<e.length;a++){var n=e[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,a,n){return a&&t(e.prototype,a),n&&t(e,n),e}}(),o=t("common:widget/lib/gmu/zepto/zepto.js"),i=n(o),l=t("common:widget/ui/nslog/nslog.js"),u=n(l),c=["您的评价会让经验的内容更优秀","我很生气！一点也帮不到我！","没有用啊，帮不了我","帮到我了，不过有待提高","非常有用，对我帮助很大","超级赞啊！简直能救我的命！"],d=function(){function t(e){r(this,t),0===+e.scored&&(this.starClickHandler=this.starClickHandler.bind(this),this.eventHandler(e))}return s(t,[{key:"eventHandler",value:function(t){var e=this;i["default"](".star-container span").on("click",this.starClickHandler),i["default"](".star-submit-button").on("click",function(a){if(i["default"](a.currentTarget).hasClass("active")){var n=i["default"](".star-container span.yellow").length;e.submitScore(n,t),u["default"](location.href,2021,{module:"article-n",page:"advanced",pos:"scorer",action:"submit",wapDetailTest:F.context("wapDetailTest")})}})}},{key:"starClickHandler",value:function(t){var e=i["default"](t.currentTarget).index()+1;this.scoreHandler(e),i["default"](".star-submit-button").addClass("active")}},{key:"submitScore",value:function(t,e){var a=this;i["default"](".star-submit-button").removeClass("active"),i["default"].ajax({url:"/submit/exp?method=rateExp",data:{eidEnc:F.context("encEid"),score:t,BdStoken:e.bdstoken,bdstt:e.bdstt},dataType:"json",success:function(t){0===t.errno||2003===t.errno?(i["default"](".star-container span").off("click",a.starClickHandler),i["default"](".star-submit-button").html("<span>感谢评价</span>")):a.tipHandler(2004===t.errno?"提交过于频繁":"出错啦")},error:function(){a.tipHandler("出错啦")}})}},{key:"scoreHandler",value:function(t){var e=i["default"](".star-container span");e.removeClass("yellow");for(var a=0;t>a;a++)e.eq(a).addClass("yellow");i["default"](".scorer-text").html(c[t]).addClass("stared-text")}},{key:"tipHandler",value:function(t){var e=i["default"](".star-tip");e.text(t),e.show(),setTimeout(function(){e.hide()},1500)}}]),t}();e["default"]=d,a.exports=e["default"]});
;define("article-n:widget/v2017/step-read/step-read.js",function(e,t,o){function n(e){i(".wgt-step-read a").on("click",function(){a(location.href,2021,{module:"article-n",page:"index",pos:"step-read",action:"click",videoShowCase:+e,wapDetailTest:F.context("wapDetailTest"),strongCorrelation:F.context("strongCorrelation"),newVersion:F.context("newVersion"),recommendVideoData:F.context("recommendVideoData")})})}var i=e("common:widget/lib/gmu/zepto/zepto.js"),a=e("common:widget/ui/nslog/nslog.js");o.exports.init=n});
;define("article-n:widget/v2017/unformat-content/unformat-content.js",function(n,o,t){function i(n,o){return i.isloading?1:(i.isloading=!0,void u.ajax({url:"/article/asyn",dataType:"html",data:{pn:n,eidEnc:l},success:function(n){i.isloading=!1,o(n)},error:function(){i.isloading=!1}}))}function e(n,o){e.delaying=window.setTimeout(function(){o(),e.delaying=null},n)}function c(n){s.async&&(n=s.async(n)),u(".loading-wp").before("<section>"+n+"</section>"),f+=1,f>=w?u(".loading-wp").hide():i(f+1,c)}function d(){return f>=w?(u(window).off("touchend"),u(window).off("scroll"),1):e.delaying?2:void e(200,function(){return document.body.scrollTop+u(window).height()+200<u(".loading-wp").offset().top?1:(u(".loading-wp").show(),void i(f+1,c))})}function a(n,o,t,i){n>1&&(u(window).on("touchend",function(){d()}),u(window).on("scroll",function(){d()})),w=n,l=o,s=t,t.start&&t.start(),i&&i.length&&r(i,".wgt-unformat-content img")}var l,s,u=n("common:widget/lib/gmu/zepto/zepto.js"),r=(n("common:widget/js/util/template/template.es"),n("article-n:widget/v2017/js/ui/swiper/swiper.es")),w=1,f=1;t.exports.init=a});